Empty JSON Payload Causes rest_invalid_json
|Reported by:||GamerZ||Owned by:||jnylen0|
|Component:||REST API||Keywords:||has-patch has-unit-tests commit fixed-major|
The rest_invalid_json error was introduced in #38547 which is meant to detect defect json in body. However, if a empty body is used, this is marked as invalid as well.
There are scenarios where empty body are used especially when deleting an item.
For example calling a DELETE method on a custom endpoint like the below means deleting the ID 1 from the item resource. There is no need to pass in any unnecessary body content.
Change History (19)
- Milestone changed from Awaiting Review to 4.7.1
- Owner set to jnylen0
- Status changed from new to accepted
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened