Change application/yaml to application/x-yaml

This commit is contained in:
Felipe Monteiro 2017-07-20 17:04:15 +01:00
parent 8cf795b7a1
commit 8476370a80
2 changed files with 2 additions and 2 deletions

View File

@ -23,6 +23,6 @@ Document creation can be tested locally using:
.. code-block:: console
curl -i -X POST localhost:9000/api/v1.0/documents \
-H "Content-Type: application/yaml" \
-H "Content-Type: application/x-yaml" \
--data-binary "@deckhand/tests/unit/resources/sample.yaml"

View File

@ -41,7 +41,7 @@ class DocumentsResource(api_base.BaseResource):
def on_post(self, req, resp):
"""Create a document. Accepts YAML data only."""
if req.content_type != 'application/yaml':
if req.content_type != 'application/x-yaml':
LOG.warning('Requires application/yaml payload.')
document_data = req.stream.read(req.content_length or 0)