When i do this with uipath http request, only “get request (200 status)” headers will shown me. But i need “post requests’s (302 status)” headers to get token. So i need to do this without redirects or i need to take header before redirect. I hope I explained well, sorry for my language.
I can’t speak to the site you are automating, but a HTTP 302 Found should be be returning a Location Header to which the agent may use the Location header automatically redirect to the temporary different URI.
According to RFC7231 for historical reasons, a User Agent may change the request method from a POST to a GET for subsequent requests and recommends other response codes (HTTP 307 Temporary Redirect) if this behavior is undesired.
Reviewing the documentation for UiPath.WebAPI.Activities.HttpClient I do not see an option to disable the following of the redirection. My suggestion would be to try and capture the Output Headers and if that doesn’t capture what you need, to submit an Idea / Enhancement in the Ideas / Activities section (Or we can move this thread over as well).
Alternatively, could review other packages available that provide similar functionality to see if they have the feature you are looking for.
Hey Tim. Let me keep this thread in this section, because maybe someone suggest the anotherway, (like request with curl or request with command prompt etc.) I will open new thread at Ideas section.
Hello, I’m facing the same issue.
In the endpoint, there is a redirect URL.
That’s why i get statuscode 200 instead of 302.
Is there already a solution for this?
Or is there a code I can use to achieve the same thing? To disable the ‘automatically follow redirects’?
I already find the following post: How to check whether the URLs is redirecting or not
But then I don’t get the correct location in the headers of the response: “message”: “https://… error_description=Failed%20to%20get%20resource%20owner%20session%20from%20request&error=invalid_request”,