Noob_Number_1
Noob_Number_1

Reputation: 755

How is a HTTP 200 Response?

there is something I'm not able to find out. I'm playing with some services using SoapUI and Wireshark and there is something I don't understand. How is a HTTP 200 Response. I now what this status code means and on SoapUI I can see responses like this one [linebreaks edited for HTTP correctness]:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 
Content-Encoding: gzip
Content-Type: text/xml;charset=UTF-8 
Content-Length: 20
Date: Mon, 14 Dec 2015 10:02:01 GMT

at the RAW tab. But I see this like a parsed response. How is the xml code? Is an empty message where header indicates that it's an affirmative answer? What exactly code does the destination receive?

Thanks

Upvotes: 1

Views: 1513

Answers (2)

JoM
JoM

Reputation: 276

"Is an empty message where header indicates that it's an affirmative answer?" See the value of Content-Length: 20 (bytes). So, the message includes 20 bytes of data in the response. As answered above, what you are seeing there is the response headers, which form the HTTP response together with the response body (data).

Upvotes: 0

Quentin
Quentin

Reputation: 943605

The HTTP format does not encode data using XML (and predates the existence of XML by several years).

Headers are key:value pairs separated with new lines. You aren't seeing a parsed response, you are looking at the raw headers. They are just very close to being a plain text format.

The only XML will be the HTTP response content (and that's only because the content-type header says the content is XML), not the HTTP response headers.

Upvotes: 1

Related Questions