내 GET 요청이 정상적으로 작동하고 XML로 응답합니다. https://mydomain.com/mypage.php?id=123&nm=ak_dhara 참고 : PHP 페이지는 https에 있습니다.POST가 작동하지 않는 곳에서 잘 작동합니다. XMLHttpRequest
하지만 POST가 작동하지 않습니다.
xhttp.open("POST"," https://mydomain.com/mypage.php",true);
xhttp.setRequestHeader("Content-type","application/xhtml+xml");
xhttp.send("id=123&nm=ak_dhara");
제안 사항?
POST에서 PHP 페이지 읽기 매개 변수가 전송됩니까? –
logcat에서 더 많은 정보를 제공 할 수 있습니까? – ruX
예 모두이 문제를 해결했습니다.
xhttp_bookaroom_request.open ("POST", "https://mydomain.com/mypage.php ", true);
\t \t \t \t xhttp_bookaroom_request.setRequestHeader ("Content-type", "application/x-www-form-urlencoded");
xhttp_bookaroom_request.setRequestHeader ("Content-length", fileAPI.length);
\t \t \t \t xhttp_bookaroom_request.send (fileAPI);
– Anildhara