using PUT method with parameters

Peter Wood pete_wood at runbox.com
Wed Jul 17 06:16:44 UTC 2013


Hi

Using Drakma-1.3.2 (via quicklisp) and Sbcl-1.1.9 on Linux (Debian Wheezy):

I believe it is allowed to send parameters with a PUT request, just as with a POST request, but Drakma only allows POST with parameters.

In request.lisp, changing this 

(when (and file-parameters-p (not (eq method :post)))
   (parameter-error "Don't know how to handle parameters in ~S, as this is not a POST request."

To this

(when (and file-parameters-p (not (member method '(:post :put))))
   (parameter-error "Don't know how to handle parameters in ~S, as this is not a POST or PUT request."

Allows PUT parameters.

I need this change for drakma to work with an common lisp interface to the paymill payment service api: https://www.paymill.com/
I would like to release the the paymill-api, but if Drakma won't let me use parameters in a put request, I will have to ship a forked version of it with the api.

Regards
Peter

(ps. Just to be clear: I'm not talking about form-data - that IS only allowed with POST.)







More information about the Drakma-devel mailing list