Ad

Sunday, June 17, 2018

XMLHttpRequest Basics API GET

response : variableName.status  // returns 200, variableName.statusText // returns "OK"

request: 
     open(method,url,async)
     send(string)
     
     var xmlhttp = new XMLHttpRequest();
     xmlhttp.open('GET', 'process.php', true);
     xmlhttp.send();

Response


-------
GET POST PUT DELETE
(Create Retrieve Update Delete CRUD)

  •      Get - retrieves info from the specified source
  • POST- sends new information to the specified source
  • Put - updates existing info of the specified source
  • Delete - removes existing info from the specified source
Status
  • 1xx server working on the request
  • 2xx okay
  • 3xx have to do something else first
  • 4xx error
  • 5xx server problem     

No comments:

Post a Comment

F1 Score - Machine Learning

F1 Score is an useful metric of classification models rather than regression machine learning models. It is an useful metrics for models tha...