Featured Post

Event Sourcing Video from Michael Ploed

Event Sourcing I want to share a great video I found few days ago that describes very well what Event Sourcing is.

Saturday, September 29, 2012

HTML Response and Content Types

HTTP Response and data stream

The HTTP protocol has two main phases of communication:
The HTTP response is a single data stream, so when you ask for a web page containing images, embedded in the stream there are links to resources (as images) that need additional requests. The browser has the responsibility to make these requests.


An HTTP response has got many HTTP headers. One of these is called Content-Type. It specifies what type of file that has been sent by the server and it's used by the browser to process the data stream.
Here are the most common content types:
  • text/html: HTML;
  • application/octet-stream:Arbitrary binary data;
  • application/zip: ZIP archive files;
  • image/jpeg: Images files;

Is it possible to make an HTTP response with different content types?

If you want to send different files you should use a ZIP file.

Suggested Posts:

No comments :

Post a Comment