In short, you need more information about the data you are downloading in order to know how to process it. Until you can identify the data type, you cannot know which bytes represent what kind of values, what endian is used for multi-byte values, etc. The set of currently defined parameters is: (1) TYPE - the general. ![]() Usually, binary data formats have a header/signature at the front of the data to identify what the data is, so you might start with that. The octet-stream subtype is used to indicate that a body contains arbitrary binary data. Without a more meaningful Content-Type to tell you what the data actually represents, the only thing you can do is analyze the raw data and make educated guesses about what it might be, unless you know through other means what the data is supposed to be. When HTTP's Content-Type header is application/octet-stream, that mean the data (after decoding it based on the Content-Encoding, if any) is raw 8bit data, the sender does not know what the actual type of the data is. ![]() ![]() There is no Content-Encoding header present in your example, so HTTP is not encoding the data in any way, it is giving you the raw data as-is. HTTP's Content-Encoding header only applies to how data is encoded inside of the HTTP message itself, not how the data itself is encoded outside of HTTP.
0 Comments
Leave a Reply. |