Skip to content

Commit

Permalink
Merge pull request #6 from collectiveidea/fixup-headers-append
Browse files Browse the repository at this point in the history
Fixup headers append syntax
  • Loading branch information
darronschall authored Feb 15, 2023
2 parents f3c52be + 94fa284 commit 758ee64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 758ee64

Please sign in to comment.