Why this XMLHttpRequest cause http 406 Why this XMLHttpRequest cause http 406 json json

Why this XMLHttpRequest cause http 406


http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html (look up 406)

In your response you have:

Content-Type:text/html; charset=iso-8859-1

In your request:

Accept:application/json, text/javascript, */*; q=0.01

My guess is you have to set Accept. If you're not using jQuery (not tagged with it) then here is how you can do it with vanilla JS:

xmlhttp.setRequestHeader("Accept"  , "text/html");

You should try to open the url in a browser, since you need to post values to it to see if it works correctly you can create a html file with a form method=post action=your godaddy site.