Multiple choice technology architecture

What’s the function of send() method in XMLHttpRequest Object?

  1. Opens a Request to the server.

  2. Returns the value of an HTTP header.

  3. Aborts the HTTP Request.

  4. None of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The send() method actually transmits the HTTP request to the server (with optional data payload). Option A describes open() which initializes the request. Option B describes getResponseHeader() which retrieves header values. Option C describes abort() which cancels the request. Since none of A-B-C correctly describe send(), D is the correct choice.