cch1 / http.async.client

Async Http Client - Clojure
http://cch1.github.com/http.async.client
267 stars 40 forks source link

Implementing PROPFIND #20

Closed ronslow closed 9 years ago

ronslow commented 13 years ago

Fantastic library. Thanks.

How would I extend to the PROPFIND method.

I am thinking along the lines of

(gen-method :propfind)

(def client (create-client client :auth {:user "user" :password "password"}))

(def body-string "<?xml version=\"1.0\" encoding=\"utf-8\" ?> <D:propfind xmlns:D=\"DAV:\">

``` ``` /D:propfind") (ignore GITHub's reformatting here - this is a propfind xml query in the body of the request) (PROPFIND client "http://someurle.com/something" :headers {:content-type "text/xml"} :body body-string) But I am getting NPE at com.ning.http.client.RequestBuilderBase.allowBody(RequestBuilderBase.java:564) because the request has got no method associated with it. Could you help me with this? Thanks Robert
neotyk commented 13 years ago

Hi ronslow,

Sorry for late followup, it is holidays season :-) Very happy you like the library.

Regarding PROPFIND I guess it is part of WebDav, right? If so, than gen-method approach might not work as it is protocol built on top of HTTP. But the good news in that case is underlying Java library has support for it, so it should be easy to bring it here.

If it is not WebDav, and you are trying to create your own custom HTTP method than it is a bug, and please attach full stack trace.

Cheers, Hubert.

cch1 commented 9 years ago

Any more input, @ronslow? If not, I'm going to close this issue.

ronslow commented 9 years ago

No thanks CCH1. Let's close the issue.