WhiteHouse / api-standards

3.08k stars 901 forks source link

Clarify file formats and use of Content-Type headers #21

Open philipashlock opened 11 years ago

philipashlock commented 11 years ago

The use of format terms like "XML" and "JSON" can be ambiguous without specifying HTTP Content-Type headers. I would also recommend specifying the character encoding here, but I'll mention that as another issue. I would recommend XML and JSON usage as the following types and the guidelines should articulate that HTTP headers should match this for each format.

XML: Content-Type: text/xml; charset=utf-8 JSON: Content-Type: application/json; charset=utf-8