YAML媒体类型? [英] YAML media type?

查看:250
本文介绍了YAML媒体类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过HTTP发送以YAML结构化的数据时,最适合使用哪种媒体类型(通常为MIME类型)?为什么?

What is the most appropriate media type (formally MIME type) to use when sending data structured with YAML over HTTP and why?

没有注册的应用程序类型文本类型.

示例:

> GET /example.yaml

< Content-Type: ????
<
< --- # Favorite movies
< - Casablanca
< - North by Northwest
< - Notorious

可能的选项:

  • text/x-yaml
  • text/yaml
  • 文本/yml
  • application/x-yaml
  • application/x-yml
  • application/yaml
  • 应用程序/yml

推荐答案

Ruby on Rails使用application/x-yaml替代text/yaml(

Ruby on Rails uses application/x-yaml with an alternative of text/yaml (source).

我认为这只是一个惯例,据我所知,没有技术原因.

I think it's just a matter of convention, there is no technical why, as far as I can tell.

这篇关于YAML媒体类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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