- Notifications
You must be signed in to change notification settings - Fork15
Open
Description
For PATCH calls, Content-Type should be set to application/json when making such API calls. However, when it is missing, updates fail and there is no error message. There should be a way to check for Content-Type and throw an error. Maybe this should be settable at a group of API level.
[ec2-user@ip-172-31-18-10 ~]$ curl -s -X PATCH https://ingresspipe.io:8443/upstream/default -H "Authorization: Bearer treehugger" -d '{"Upstream_ip":"172.17.0.1"}' | python -m json.tool{ "data": { "update_saaras_db_upstream": { "affected_rows": 1 } }}[ec2-user@ip-172-31-18-10 ~]$ curl -s -X PATCH https://ingresspipe.io:8443/upstream/default -H "Authorization: Bearer treehugger" -d '{"Upstream_ip":"172.17.0.1"}' | python -m json.tool{ "data": { "update_saaras_db_upstream": { "affected_rows": 1 } }}[ec2-user@ip-172-31-18-10 ~]$ curl -s -X PATCH https://ingresspipe.io:8443/upstream/default -H "Authorization: Bearer treehugger" -H "Content-Type: application/json" -d '{"Upstream_ip":"172.17.0.1"}' | python -m json.tool{ "data": { "update_saaras_db_upstream": { "affected_rows": 1 } }}
Metadata
Metadata
Assignees
Labels
No labels