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

React UI, UI UX, Reactstrap React Bootstrap

React UI MATERIAL  Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms.  Columns, grid