[drakma-devel] Problem abouth POST HTTP request

Nicolas Lamirault lam at tuxfamily.org
Tue Sep 18 12:42:36 UTC 2007


ok thanks.
i will try with :content parameter.
it's not my server :)

thanks for your help


Ralf Mattes <rm at seid-online.de> writes:

> On Tue, 2007-09-18 at 13:55 +0200, Nicolas Lamirault wrote:
>> thanks for your response.
>
>> 
>> > I guess you server implementation isn't too picky/stable/wel--programmed
>> > and blindly reads the request data anyway :-/
>> >
>> >> i would like to make the same request using Drakma :
>> >> 
>> >> CL-USER> (drakma:http-request "http://localhost:8888/test"
>> >>                               :method :post
>> >>                               :form-data t
>> >>                               :external-format-out :UTF-8
>> >>                               :parameters '(("author" . "nicolas")))
>> >
>> > But this will send the request data formated as multipart/form-data and
>> > of course the toy-parser will hickup un that. What do you expect?
>> 
>> i would like a http code 200 and a result like this :
>
> ;-) Programming by wish  - I wish that would work.
> Your server seems to expect the request data in json format. That means
> you can't use drakma's :parameters keyword. You want to use :content
> (http://weitz.de/drakma/#content) and provide the content in json format
> (you could use http://common-lisp.net/project/cl-json/ if you are too
> lazzy to reinvent the wheel).
>
>  HTH RalfD
>
>

-- 
Nicolas Lamirault



More information about the Drakma-devel mailing list