Skip to content

Commit ea6bfaf

Browse files
authored
Merge pull request #188 from Ecwid/http-request-charset
Added an explicit encoding setting when creating http request in order to correctly transfer the value of the query parameters in POST requests
2 parents 2ba04f7 + 89d157f commit ea6bfaf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/kotlin/com/ecwid/apiclient/v3/httptransport/impl/ConvertUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ internal fun HttpRequest.toHttpUriRequest(): HttpUriRequest {
3333
}
3434
return requestBuilder
3535
.apply {
36+
charset = Charsets.UTF_8
3637
params.map { (name, value) ->
3738
BasicNameValuePair(name, value)
3839
}.forEach(this::addParameter)

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CustomAppRequestRules.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,6 @@ val customAppRequestNullablePropertyRules: List<NullablePropertyRule<*, *>> = li
187187
AllowNullable(CustomAppRequest.WholesalePriceEntry::quantity),
188188
AllowNullable(CustomAppRequest::cart),
189189
AllowNullable(CustomAppRequest::merchantAppSettings),
190-
AllowNullable(CustomAppRequest::storeId)
190+
AllowNullable(CustomAppRequest::storeId),
191+
AllowNullable(CustomAppRequest::lang),
191192
)

0 commit comments

Comments
 (0)