My web application works as follows:
- / abc / xyz: response 301 permanent redirect Location: / abc / xyz /
- / abc / xyz /: corresponding response based on the requested HTTP method
Now when I issue the request as follows:
dojo.xhr('PUT', {url : "/abc/xyz"})
The sequence of operations is performed automatically:
- PUT request is sent
- Received 301 Permanent Redirects
- A GET request is sent to the new URL / abc / xyz /
I do not understand why this is happening. I do not want dojo.xhr to be so smart. I want him to just focus on the 301 permanent redirect response and let me take care of how to handle permanent redirects. I would rather update the url and send a new PUT request in this case. The situation is the same for all other HTTP methods like OPTIONS, etc. I used PUT in the above example as an example.
Is there a way to configure dojo.xhr to behave this way?
source
share