javascript - Chrome extension XHR status 200 but not log on Apache logs -


i'm developing chrome extension (my first) , don't understand 1 thing.

i call php page on server xhr (fetch have same result). console says that's request ok status 200, have no log of request on apache log.

when call page myself directly on address bar, see page on apache log, , php script doing job.

my javascript code (chrome extension):

var url "http://server/page.php?t=[token]";     var xhr = new xmlhttprequest(); xhr.open("get", url, true); xhr.onreadystatechange = function() {   if (xhr.readystate == 4) { console.log(xhr.status); } } xhr.onerror = function () { console.log("error 1"); }; xhr.send(); 

the data of php page is:

{ "error": "0" } // or 1 / 2 

have saw same issue or understand i'm doing wrong? thanks.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -