XMLHttpRequest Vs HttpRequest

13,219

XMLHttpRequest is a standard javascript object that allows you to make HTTP Requests from the browser in javascript.

HttpRequest is a server side object that represents a request to the server.

In summary - one works in the browser, the other in the web server. They also have completely different roles. XMLHttpRequest is for fetching web resources within the browser. HttpRequest represents an incoming request.

Share:
13,219

Related videos on Youtube

dali1985
Author by

dali1985

Updated on June 04, 2022

Comments

  • dali1985
    dali1985 over 1 year

    Does anyone know, what an XMLHttpRequest enables a web page to do, which cannot be done using a normal HttpRequest?

  • Ryan Mckenna
    Ryan Mckenna over 2 years
    Surely they both represent outgoing requests! Hence the work request, anything that is incoming is a response! I thought XMLHttpRequest was as you said, a means of making a http request via javascript and that a HttpRequest is an object that is built into the browser that represents a request made via the url bar in the browser's gui.