go-json-rest-examples
go-json-rest-examples copied to clipboard
response 405 Method Not Alllowed
local running the program. and local run curl as example.
curl -i -X DELETE http://127.0.0.1:8080/cities/562 HTTP/1.1 405 Method Not Allowed Content-Type: application/json X-Powered-By: go-json-rest Date: Sun, 15 Mar 2015 15:25:32 GMT Content-Length: 35
{ "Error": "Method not allowed" }
GET and POST works well, but PUT does not work same as PUT.
Hi,
curl -i -X DELETE is not using the method PUT, it's using DELETE. You should verify that you have a Route defined for each expected method.
Antoine