在自定义Internet媒体类型(MIME类型)中使用加号 [英] Using plus sign in custom internet media types (MIME types)

查看:255
本文介绍了在自定义Internet媒体类型(MIME类型)中使用加号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个RESTful Web服务,我正在创建一些自定义媒体类型。在媒体类型中,当您从右到左使用+时,子类型变得更具体。例如:

I'm building a RESTful web service, and I'm creating some custom media types. It seems like in media types the subtype becomes more specific as you go right to left using '+'. So for example:

application / json application / hal + json更通用,因为 HAL 在json之上添加了更多限制。

application/json is more general than application/hal+json, since HAL adds more restrictions on top of json.

我的问题是这是标准的,还是只是一个约定(我已经通过一些关于MIME类型的RFC进行了调查,但是我找不到任何东西,但我可能看起来不是很难足够)。

My question is whether this is standard, or just a convention (I've poked through some of the RFCs on MIME types and I couldn't find anything, but I may not have looked hard enough).

如果它是标准的,它是否会推广,所以我可以添加更多特定的子类型,如 application / vnd.custom.mime + hal + json 或仅限于一个+?

If it is standard, does it generalize so I can add even more specific subtypes like application/vnd.custom.mime+hal+json or is it limited to one "+"?

推荐答案

注册新后缀的程序现在在 http://trac.tools中定义。 ietf.org/html/draft-ietf-appsawg-media-type-regs-14#section-6

The procedure for registering new suffixes is now defined in http://trac.tools.ietf.org/html/draft-ietf-appsawg-media-type-regs-14#section-6.

+ json将被定义在另一份文件中;现在: http://trac.tools .ietf.org / html / draft-ietf-appsawg-media-type-suffix-regs-02#section-3.1

"+json" will be defined in a separate document; right now: http://trac.tools.ietf.org/html/draft-ietf-appsawg-media-type-suffix-regs-02#section-3.1

不,你是不应该有多个子类型。

And no, you are not supposed to have multiple subtypes there.

这篇关于在自定义Internet媒体类型(MIME类型)中使用加号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆