REST API Service is giving 307 status code

0
Hi People,    I am trying to make a POST call from Mendix to a external system but I am getting 307 error.  Since 307 status code is been sent i tried to hit the redirected link, but this time i am getting 401 unauthorised request error.  But the weird thing is this happens on the first time i hit that API in a session.   Any idea on why it is behaving in such manner or anyone encountered the same issue ?  
asked
2 answers
0

A 307 status code is temporary redirect. From my understanding, this usually occurs when requesting http (non-encrypted) but the target API requires https (encrypted) traffic.  In other cases it could be caused by a missing slash at the end of the URL.

 

As for the 401, that is an authentication or authorization related error, validate that you are using the correct credentials and authentication type for the API.

answered
0

The 307 response indicates that the server tells the client to redo the request, but to the location specified in the Location header.

On the new URL the 401 response indicates that the request did not include the required credentials.

answered