How to complete the challenge POST /api/heartbeat as DELETE (405)
Send a normal POST request to /api/heartbeat, but add this header:
X-HTTP-Method-Override: DELETE
The server treats the request as a DELETE and returns 405.
Try it now
POST /api/heartbeat with DELETE override to trigger 405
Lessons Learned
X-HTTP-Method-Override: DELETElets aPOSTtunnel a method that the endpoint then evaluates asDELETE.- The final status comes from the effective method, not from the outer
POST. - Method override tests should verify both the override header and the endpoint rules.
Suggested Experiments
- Remove
X-HTTP-Method-Overrideand compare plainPOST /api/heartbeatwith the overriddenDELETE. - Change only the override value to
PATCHand check whether the status followsPATCHbehavior.