[OSM-dev] X_HTTP_METHOD_OVERRIDE

hy-soft hy-soft at sha-mash.de
Fri Dec 18 21:16:54 GMT 2009


Matt Amos wrote:
> On Fri, Dec 18, 2009 at 2:27 PM, hy-soft <hy-soft at sha-mash.de> wrote:

>> I can not get it to work, neither with curl
>> which hasn't implemented a delete Method, so I tried
>> X_HTTP_METHOD_OVERRIDE: DELETE
>>
>> curl -v  -G -H "X_HTTP_METHOD_OVERRIDE: DELETE" -T DOSM0134.XML
>> "http://api.openstreetmap.org/api/0.6/node/595647268"
> 
> that's not the command listed on the wiki page. the command listed
> there (updated for delete) is:
> curl -v -v -u username:password -d @node.osm -H
> "X_HTTP_METHOD_OVERRIDE: DELETE"
> "http://api06.dev.openstreetmap.org/api/0.6/node/1168959"

Well I omitted user&password in the example above
The command I sent did actually trigger an update of the node.

Now when I use a post [option -d] as given in your example it works -
with curl.

But using POST with indy-sockets returns an Error 405: method not allowed.

So thanks for clearing up the matter regarding curl, but actually I
still can not use the api via indy-sockets.

The header is being sent - but obviously not recognized then.

If I am using DELETE (which would be the right thing to do IMHO) it
takes about a minute until an exception is created, that results in the
message:
connection closed gracefully.
)-:




More information about the dev mailing list