Hi everyone! In KMM project using Ktor, when I wan...
# multiplatform
h
Hi everyone! In KMM project using Ktor, when I want to pass an access token to the header of a request I get this exception:
io.ktor.client.features.ClientRequestException
.  This is my code:
Copy code
httpClient.request("https://...") {
    method = <http://HttpMethod.Post|HttpMethod.Post>

    header("Authorization", "access token")
}
What’s wrong with this code?
b
What's the exception message?
h
@bsimmons The problem was me. In addition to the ktor header I was sending a null token for all requests using Okhttp Interceptor. By deleting the interceptor the problem fixed. Thank you
👍 1