XMLHttpRequest Question:

Explain setRequestHeader("label", "value")?

XHR2 Interview Question
XHR2 Interview Question

Answer:

The setRequestHeader("label", "value") method is used to assign a label/value pair to the header to be sent with a request.


Previous QuestionNext Question
What is status?How do we pass parameters to the server?