Fix sending of requests apart from GET and POST.

Some new API calls require a PUT. Also allows DELETE calls to be made.

This ought to resolve Issue #162 as well.