Skip to content

Commit 97886a1

Browse files
committed
ECWID-161269 - fix addition value to map
1 parent 66903ab commit 97886a1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ class ApiClientHelper private constructor(
277277
internal fun RequestInfo.toHttpRequest(requestId: String, responseFieldsOverride: ResponseFields?): HttpRequest {
278278
val uri = createApiEndpointUri(pathSegments)
279279
val params = if (responseFieldsOverride != null) params.withResponseFieldsParam(responseFieldsOverride) else params
280-
val headers = headers.withRequestId(requestId)
281-
if (requestKind != null) {
282-
headers.withRequestKind(requestKind)
283-
} else {
284-
headers.withCredentials(credentials)
280+
val headers = headers.withRequestId(requestId).let {
281+
if (requestKind != null) {
282+
it.withRequestKind(requestKind)
283+
} else {
284+
it.withCredentials(credentials)
285+
}
285286
}
286-
287287
return when (method) {
288288
HttpMethod.GET -> HttpRequest.HttpGetRequest(
289289
uri = uri,

0 commit comments

Comments
 (0)