when this is executed, response contains redirect ...
# ktor
c
when this is executed, response contains redirect 302 and the code throws UnhandledRedirectionException. if I do the same request with httpie, I get status 200 and correct response. Am I doing something wrong with ktor client?
e
Hi @Czar, it should be problem with the redirect feature. What version of ktor do you use? Btw if your data isn't sensitive, could you install
Logging
feature(for headers) and post it? It could help to clarify why redirect didn't happen.
c
Ktor.ALL.log
🙏 1
ktor version 1.3.1
e
It looks like you're using the
post
method. Redirect is forbidden for the post
c
there should not be a redirect there in the first place, with any other client I tried there is no redirect. Ktor is doing something weird with the request.
the endpoint normally just returns 200 with a
application/json
response
It was me, everything works. when testing with outside of app clients I was using URL with
www
but with ktor
www
was missing, that's why the server was redirecting...
🕵️‍♂️ 1