Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove :urlencoded and :multipart from Plug.Parsers in all APIs #263

Open
Pavinati opened this issue Feb 27, 2020 · 0 comments · May be fixed by #831
Open

Remove :urlencoded and :multipart from Plug.Parsers in all APIs #263

Pavinati opened this issue Feb 27, 2020 · 0 comments · May be fixed by #831
Labels
API This issue or pull request is about API (e.g. unclear API, new API, API change, deprecation) app:appengine_api This issue or pull request is about astarte_appengine_api application app:housekeeping_api This issue or pull request is about astarte_housekeeping_api application app:pairing_api This issue or pull request is about astarte_pairing_api application app:realm_management_api This issue or pull request is about astarte_realm_management_api application minor This issue causes only minor annoyance to the user user experience This issue is about user experience
Milestone

Comments

@Pavinati
Copy link
Collaborator

Sending a HTTP request to any API providing unsupported content-type returns wrong error code

curl -X PUT $API_URL \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/x-www-form-urlencoded" \
  -d "data=true"

Yelds
{"errors":{"detail":"Unexpected value type","expected_type":"boolean"}}

Expected result
Status code 415 - Unsupported media type

@Pavinati Pavinati added user experience This issue is about user experience API This issue or pull request is about API (e.g. unclear API, new API, API change, deprecation) labels Feb 27, 2020
@rbino rbino changed the title Unsupported content types in API requests Remove :urlencoded and :multipart from Plug.Parsers in all APIs Jan 17, 2023
@rbino rbino added this to the v1.2 milestone Jan 17, 2023
@rbino rbino added app:appengine_api This issue or pull request is about astarte_appengine_api application app:housekeeping_api This issue or pull request is about astarte_housekeeping_api application app:pairing_api This issue or pull request is about astarte_pairing_api application app:realm_management_api This issue or pull request is about astarte_realm_management_api application minor This issue causes only minor annoyance to the user labels Jan 17, 2023
@bettio bettio modified the milestones: v1.2, v1.3 Jun 19, 2023
@noaccOS noaccOS linked a pull request Aug 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This issue or pull request is about API (e.g. unclear API, new API, API change, deprecation) app:appengine_api This issue or pull request is about astarte_appengine_api application app:housekeeping_api This issue or pull request is about astarte_housekeeping_api application app:pairing_api This issue or pull request is about astarte_pairing_api application app:realm_management_api This issue or pull request is about astarte_realm_management_api application minor This issue causes only minor annoyance to the user user experience This issue is about user experience
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants