From 94fa28478f4afd05029f74ccdbc361494a993054 Mon Sep 17 00:00:00 2001 From: darronschall Date: Wed, 15 Feb 2023 17:03:17 -0500 Subject: [PATCH] Fixup syntax error in generator code from 5e394973 --- generator/src/main/kotlin/com/collectiveidea/twirp/Generator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/src/main/kotlin/com/collectiveidea/twirp/Generator.kt b/generator/src/main/kotlin/com/collectiveidea/twirp/Generator.kt index a483021..5ade956 100644 --- a/generator/src/main/kotlin/com/collectiveidea/twirp/Generator.kt +++ b/generator/src/main/kotlin/com/collectiveidea/twirp/Generator.kt @@ -28,7 +28,7 @@ class Generator : ServiceGenerator { implementationMethods += """ override suspend fun ${kotlinServiceMethodName}(request: $reqType, requestHeaders: Headers?): Pair<$respType, Headers> { val response: HttpResponse = httpClient.post("${service.file.packageName}.${service.name}/${method.name}") { - requestHeaders?.forEach { headers.append(it.key, it.value) } + requestHeaders?.let { headers.appendAll(it) } setBody(request.encodeToByteArray()) } return Pair($respType.decodeFromByteArray(response.body()), response.headers)