Zoltan Demant09/26/2023, 1:42 PM
for certain requests. Yet, the URL:s work perfectly fine when using curl in the command line. Why could that be?
Unhandled redirect: DELETE <https://foo.bar>. Status: 301 Moved Permanently. Text: ""
Casey Brooks09/26/2023, 1:51 PM
Zoltan Demant09/26/2023, 2:21 PM
(forgot to press send earlier 😅).
followRedirects = true
Casey Brooks09/26/2023, 2:30 PM
header with the URL to redirect to. It’s commonly used to upgrade an HTTP connection to HTTPS, for example. https://en.wikipedia.org/wiki/HTTP_301 Also, by default it looks like the Ktor client only handles redirection for GET requests, while you’re is a DELETE. You might try configuring it to set this property to false so it also works for DELETE
Zoltan Demant09/26/2023, 3:42 PM
Casey Brooks09/26/2023, 3:44 PM
Zoltan Demant09/27/2023, 3:42 AM
Please note: changing this flag could lead to security issues, consider changing the request URL instead.I dont believe this is possible for me to do, given that theyre identical on the surface? Also, never thought about the server adding cookies/headers like that - but makes sense, Ill check with the API owners about this.
at the end of the URL makes a world of a difference! I cant believe I missed that, looking through my logs I can see that the redirect URL actually has the added slash, I just didnt notice it .. for 5 hours yesterday ❤️ Everything works now.
Casey Brooks09/27/2023, 2:12 PM