Project

General

Profile

PUT/DELETE requests are showing as POST request_methods.

Added by danzimal almost 10 years ago

I'm stuck here. I'm developing a RESTful API and using curl such as;
curl -PUT -d "id=2" 10.10.10.1/some/resource
curl -DELETE -d "id=2" 10.10.10.1/some/resource

But the REQUEST_METHOD is always POST.

I thought I might need the mod_webdav module, so I installed it, but it didn't help.

PLEASE ADVISE


Replies (1)

RE: PUT/DELETE requests are showing as POST request_methods. - Added by danzimal almost 10 years ago

Well, as it turns out, I guess I was on the wrong path (mod_webdav).

After more digging, I discovered the following curl syntax that did the trick.

curl -GET -XPUT -d "id=2" 10.10.10.1/some/resource
curl -GET -XDELETE -d "id=2" 10.10.10.1/some/resource

    (1-1/1)