search

Home  >  Q&A  >  body text

What is this request header used for?

原生ajaxde

request.setRequestHeader('content-type','application/x-www-form-urlencoded');

小邓小邓1925 days ago912

reply all(1)I'll reply

  • (O_O)

    (O_O)2019-09-19 21:37:33

    When the action is get, the browser uses the x-www-form-urlencoded encoding method to convert the form data into a string (name1=value1&name2=value2...), then appends the string to the end of the url, splits it with ?, and loads it. this new url.

    reply
    1
  • Cancelreply