add HTTP support for PUT and DELETE

Modified version of #312.