Altova XMLSpy 2024 Enterprise Edition

Receiving the Response

Home Prev Top Next

The response to an HTTP request is displayed in the right-hand pane of the HTTP output window (see screenshot below).

Click to expand/collapse

To the right of the Body, Headers, and Log tabs are listed the following details about the response:

 

The HTTP status code (explained below)

The time from connection made to last response-chunk received

The Content-Type of the response

 

 

The Response pane has three tabs: Body (screenshot below left), Headers (screenshot above), and Log (screenshot below right).

Click to expand/collapse     xshttpresponselog_zoom75

Body tab: The body of the response is displayed with syntax coloring if the document is HTML, XML, or JSON, and with line-numbering. The tab has two buttons: (i) Save to File to save the body to a file, and (ii) Create New Document to create a new document in XMLSpy and display the newly created document in the Main Window of the GUI. A newly created document can be edited and saved in the usual way. If a new document cannot be created from the body of the response (for example if the body is an image), then the Create New Document button is disabled (see screenshot further below).

Headers tab: Contains the headers of the response. The Content-Type header is also displayed at the top of the pane.

Log tab: Events and information relating to the request are displayed in the Log tab, which has line-numbering. The log can be saved to file or created as a new document in the Main Window. A newly created document can be edited and saved in the usual way.

 

HTTP status codes

Status codes are categorized as follows:

 

2XX codes are used for successful requests.

3XX codes are used for redirects.

4XX codes are used if there was a problem with the request.

5XX codes are used if there was a problem with the server.

 

Some commonly encountered codes:

 

200 OK: Sent in response to a successful request.

206 Partial Content: The server sends only a part of the resource because only a range of the resource was requested.

301 Moved Permanently: The request should be redirected to the given URL.

401 Unauthorized: The resource requires authentication, and authentication has either failed or not been provided.

403 Forbidden: Valid request, but the server is refusing action. This might be because the user does not have the necessary credentials.

404 Not Found: The resource could not be found.

500 Internal Server Error: A generic error message; sent when no more specific message is available.

 

See: A complete list of HTTP status codes.

 

The Accept Header

The Accept header of the request specifies the content type to accept in the response. For example, see the difference between the responses when Accept=image (first screenshot below) and when Accept=image/png (second screenshot below). In the first case, since it is not specified what image format should be sent in the response, an error status code and a JSON message containing more information is sent.

Click to expand/collapse

Click to expand/collapse

 

© 2018-2024 Altova GmbH