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.
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" 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.
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.
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.
You should use application/octet-stream
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With