Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the HTTP "content-type" to use for a blob of bytes?

What is the HTTP "content-type" to use when returning a blob of bytes in response to a client's GET request?

In this case, the information payload is an object serialized using Python's Pickle library.

like image 620
Chris Dutrow Avatar asked Nov 04 '12 22:11

Chris Dutrow


People also ask

What is blob type in HTML?

Blob.type 1 Syntax. A DOMString containing the file's MIME type, or an empty string if the type could not be determined. 2 Example. This example asks the user to select a number of files, then checks each file to make sure it's one of a given set of image file types. 3 Specifications 4 Browser compatibility 5 See also

What is the HTTP content-type for returning a blob of bytes?

What is the HTTP "content-type" to use when returning a blob of bytes in response to a client's GET request? In this case, the information payload is an object serialized using Python's Pickle library. Note that everything is a 'blob of bytes', but if there's indeed to known mimetype, application/octet-stream is a good pick.

What is content type content type?

Content-Type. The Content-Type representation header is used to indicate the original media type of the resource (prior to any content encoding applied for sending). In responses, a Content-Type header tells the client what the content type of the returned content actually is.

What is the Content-Type header?

Last Updated : 29 Jul, 2021 The Content-Type header is used to indicate the media type of the resource. The media type is a string sent along with the file indicating the format of the file. For example, for image file its media type will be like image/png or image/jpg, etc.


1 Answers

You should use application/octet-stream.

like image 177
SLaks Avatar answered Sep 23 '22 14:09

SLaks