Created
July 19, 2010 02:19
-
-
Save madpilot/480932 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a file on your desktop, enter the code, and then open it LOCALLY in your browser | |
// This works... | |
var http = new XMLHttpRequest(); | |
var url = "http://www.need-a-real-url.com"; | |
var params = "<data></data>"; | |
http.open("POST", url, true); | |
http.send(params); | |
// This doesn't... | |
var http = new XMLHttpRequest(); | |
var url = "http://www.need-a-real-url.com"; | |
var params = "<data></data>"; | |
http.open("POST", url, true); | |
http.setRequestHeader('Content-Type', 'application/xml'); | |
http.send(params); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment