“Jak dodać dane JSON do xmlhttprequest” Kod odpowiedzi

Jak dodać dane JSON do xmlhttprequest

var xmlhttp = new XMLHttpRequest();   // new HttpRequest instance 
var theUrl = "/json-handler";
xmlhttp.open("POST", theUrl);
xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xmlhttp.send(JSON.stringify({ "email": "[email protected]", "response": { "name": "Tester" } }));
bobsfriend

Jak dodać dane JSON do xmlhttprequest

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Precious Peafowl

Odpowiedzi podobne do “Jak dodać dane JSON do xmlhttprequest”

Pytania podobne do “Jak dodać dane JSON do xmlhttprequest”

Więcej pokrewnych odpowiedzi na “Jak dodać dane JSON do xmlhttprequest” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu