Skip to content

Commit eed465e

Browse files
fix(client): multi-value header serialization
1 parent 3b40c1c commit eed465e

File tree

1 file changed

+3
-3
lines changed
  • legalesign-sdk-java-client-okhttp/src/main/kotlin/com/legalesign_sdk/api/client/okhttp

1 file changed

+3
-3
lines changed

legalesign-sdk-java-client-okhttp/src/main/kotlin/com/legalesign_sdk/api/client/okhttp/OkHttpClient.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC
109109

110110
val builder = Request.Builder().url(toUrl()).method(method.name, body)
111111
headers.names().forEach { name ->
112-
headers.values(name).forEach { builder.header(name, it) }
112+
headers.values(name).forEach { builder.addHeader(name, it) }
113113
}
114114

115115
if (
116116
!headers.names().contains("X-Stainless-Read-Timeout") && client.readTimeoutMillis != 0
117117
) {
118-
builder.header(
118+
builder.addHeader(
119119
"X-Stainless-Read-Timeout",
120120
Duration.ofMillis(client.readTimeoutMillis.toLong()).seconds.toString(),
121121
)
122122
}
123123
if (!headers.names().contains("X-Stainless-Timeout") && client.callTimeoutMillis != 0) {
124-
builder.header(
124+
builder.addHeader(
125125
"X-Stainless-Timeout",
126126
Duration.ofMillis(client.callTimeoutMillis.toLong()).seconds.toString(),
127127
)

0 commit comments

Comments
 (0)