Server Response Properties

Property Description
responseText get the response data as a string
responseXML get the response data as XML data

The responseText Property

The responseText property returns the server response as a JavaScript string, and you can use it accordingly:

EXAMPLE ❯


The responseXML Property

The XMLHttpRequest object has an in-built XML parser.

The responseXML property returns the server response as an XML DOM object.

Using this property you can parse the response as an XML DOM object:

EXAMPLE ❯


Server Response Methods

Method Description
getResponseHeader() Returns specific header information from the server resource
getAllResponseHeaders() Returns all the header information from the server resource

The getAllResponseHeaders() Method

The getAllResponseHeaders() method returns all header information from the server response.

EXAMPLE ❯


The getResponseHeader() Method

The getResponseHeader() method returns specific header information from the server response.

EXAMPLE ❯