Guys I have a used case like getting csrf token from my backend service on post auth call, which is a prerequisite for all my further requests, can i get a help how to achieve this in Ktor as I dont see such used cases mentioned in documentation, bcz my backend service returns 302 with redirection exception, i don't care about exception but what i need is csrf token received from response
a
Anton Afanasev
10/12/2021, 1:14 PM
I am not sure if Ktor support a redirect for POST requests.
But you can try:
Copy code
install(HttpRedirect) {
checkHttpMethod = false
}
in your HttpClient init
h
hsyogesh
10/12/2021, 1:21 PM
Thanks for the reply Anton I got the solution, we can enable cookies through