How do you force a web browser to use POST when getting a url?
How do you force a web browser to use POST when getting a url?
If you had the problem of doing:
request.open('POST',url,true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send("data="+JSON.stringify(data));
and in dev tools you still se it is doing a GET then that means that your url is in the following format:
Meaning it should be:
Its a very bizarre error maybe not related with your question but I ve had it a couple of times and it should be out there as it looks seriously dangerous. This happened to me when using an apache 2 server on Ubuntu 14.04, with not much configuration.
The utility "Fiddler" by Telerik (free ware) allows you to "compose" an http request and send it using any method you choose (Get, Post, Put, Del, etc) It also will give you some very detailed information about the request and the response that can be very helpful during testing and debugging