My web application works as follows:
- /abc/xyz : response 301 permanent redirect Location : /abc/xyz/
- /abc/xyz/ : appropriate response based on HTTP method requested
Now when I issue a request as follows:
dojo.xhr('PUT', {url : "/abc/xyz"})
The following sequene of operations happen automatically:
- A PUT request is sent
- A 301 permanent redirect is received
- A GET request is sent to the new URL /abc/xyz/
I don't understand why this is happening. I don't wish dojo.xhr to be so smart. I wish it to just stop on 301 permanent redirect response and let me take care of how to handle permanent redirect. I would prefer to update the url and send a fresh PUT request in this case. The situation is same for all other HTTP methods like OPTIONS etc. I used PUT in above just as example.
Is there any option to configure dojo.xhr to behave like this?