简体   繁体   English

数字数组的MIME类型?

[英]MIME Type for numerical arrays?

I am thinking about an application which will use HTTP to transfer blocks of numbers with data types like "network-endian, signed 32-bit integer" or "ieee binary64,network-endian" etc. For this application I (probably) want to put this type info in the HTTP headers rather than the message body. 我正在考虑一个应用程序,该应用程序将使用HTTP来传输数据类型为“网络端,带符号的32位整数”或“ ieee binary64,网络端”等数字类型的块。对于这个应用程序,我(可能)想要将此类型信息放入HTTP标头而不是消息正文中。

This seems to be a job for Content-Type header, but I know of no standard MIME types for this sort of thing. 这似乎是Content-Type标头的工作,但我不知道这类事情有标准的MIME类型。 Are there any? 有吗 If not, what is the best option? 如果没有,最好的选择是什么? Invent a content-type? 发明内容类型? Invent a new HTTP header? 发明一个新的HTTP标头? Put it in the message body after all? 毕竟将其放在消息正文中?

If it's a header, the field name of the header defines its content, not the Content-Type; 如果是标题,则标题的字段名称定义其内容,而不是Content-Type; they should be completely separable. 它们应该是完全可分离的。 Ie, a Content-Type that has a particular relationship to / requirement for a header is a protocol design smell. 即,与报头具有特定关系/对报头的要求具有特定关系的内容类型是协议设计的味道。

I'd put it in the message body and mint a new media type -- but only after having a really long, hard look at the current options, of which there are many. 我将其放在消息正文中,并创建了一种新的媒体类型-但只有在对当前选项进行了很长时间的认真研究之后,才有很多选择。 Formats are hard. 格式很难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM