[Question] Getting redirect URL #1988
-
Greetings, I'm using reqwest to do a POST request to an endpoint that will answer with a redirect. The redirect will then fail, because there's nothing listening at that address, but I need to be able to inspect the redirect's URL for further processing. I don't care whether that URL will be queried or not, as long as I can get it as a string (or string slice). Right now I'm able to get it as part of an error message, but this isn't ideal as that error could change in the future. Is there a way to do this? GTP |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hm, so a couple things come to mind:
|
Beta Was this translation helpful? Give feedback.
The request shouldn't fail. You'll just get a
Response
with a redirect status code, and alocation
header.