Skip to content

Handle content-type correctly (api, /messages)#61

Merged
kevinbader merged 3 commits intomasterfrom
post-msg-content-type
May 29, 2018
Merged

Handle content-type correctly (api, /messages)#61
kevinbader merged 3 commits intomasterfrom
post-msg-content-type

Conversation

@kevinbader
Copy link
Copy Markdown
Contributor

  • Allow MIME type options like ';charset=utf-8' for json content-type
  • Allow application/x-www-form-urlencoded and multipart encodings
  • Return "415 Unsupported Media Type" for unknown content-types

@mmacai
Copy link
Copy Markdown
Collaborator

mmacai commented Apr 5, 2018

Works, but perhaps you should add few small tests (for application/json;charset=utf-8, application/x-www-form-urlencoded, some unsupported media type) to be sure that it will work also in the future (we may decide at some point to add/update something in this controller).

@kevinbader kevinbader force-pushed the post-msg-content-type branch from 3e81731 to 5166319 Compare April 13, 2018 05:37
- Allow MIME type options like ';charset=utf-8' for json content-type
- Allow application/x-www-form-urlencoded and multipart encodings
- Return "415 Unsupported Media Type" for unknown content-types
@kevinbader kevinbader force-pushed the post-msg-content-type branch from 5166319 to b890cd7 Compare April 13, 2018 05:41
@mmacai mmacai self-requested a review May 28, 2018 19:09
Copy link
Copy Markdown
Collaborator

@mmacai mmacai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well even with example.

@kevinbader kevinbader merged commit 94939d1 into master May 29, 2018
@kevinbader kevinbader deleted the post-msg-content-type branch May 29, 2018 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants