jvassbo
10/01/2018, 10:47 AMe5l
10/01/2018, 10:49 AMcontentType
header by hand. It's forbidden.e5l
10/01/2018, 10:49 AMAccept
header to ContentType.Application.Json
in fetchData
and drop contentType()
setupjvassbo
10/01/2018, 10:54 AMcontentType(ContentType.Application.Json)
is needed for the JsonFeature
to kick in. Removing it (or replacing with Accept header) will cause a ClassCastException since body
is not a OutgoingContent
e5l
10/01/2018, 10:56 AMJsonFeature
?e5l
10/01/2018, 10:57 AMjvassbo
10/01/2018, 10:57 AMHttpClient(Apache) {
install(JsonFeature) {
serializer = JacksonSerializer()
}
}
e5l
10/01/2018, 11:01 AMobject Json : OutgoingContent.NoContent() {
override val contentType: ContentType get() = ContentType.Application.Json
}
Would be nice if you file an github issue. It's an API problem and I'll try to fix it asap.jvassbo
10/01/2018, 11:02 AMjvassbo
10/01/2018, 11:12 AMe5l
10/01/2018, 11:13 AMjvassbo
10/01/2018, 11:23 AMMockHttpResponse
into MyResponse
data class 🤔e5l
10/01/2018, 1:39 PM