<p>What is the most appropriate media type (formally MIME type) to use when sending data structured with YAML over HTTP and why?</p>
<p>There is no registered <a href="http://www.iana.org/assignments/media-types/application/" rel="noreferrer">application type</a> or <a href="http://www.iana.org/assignments/media-types/text/" rel="noreferrer">text type</a> that I can see.</p>
<p>Example:</p>
<pre><code>&gt; GET /example.yaml

&lt; Content-Type: ????
&lt;
&lt; --- # Favorite movies
&lt; - Casablanca
&lt; - North by Northwest
&lt; - Notorious
</code></pre>
<p>Possible options:</p>
<ul>
<li>text/x-yaml</li>
<li>text/yaml</li>
<li>text/yml</li>
<li>application/x-yaml</li>
<li>application/x-yml</li>
<li>application/yaml</li>
<li>application/yml</li>
</ul>

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.