You can always use the PutMethod directly:
HttpClient client=new HttpClient();
client.startSession("localhost",8080,new Credentials("dirk","dirk"));
client.setDebug(1000);
PutMethod pm=new PutMethod();
pm.setPath("/slide/files/string.txt");
pm.sendData("test sendData with string");
client.executeMethod(pm);
client.endSession();
Dirk
Carlos Hung wrote:
>
> I'm using the WebdavResource APIs in my application.
>
> Instantiating a WebdavResource(HttpURL url) generates a PROPFIND
> method.
>
> I've tried to instantiate it using:
> WebdavResource(HttpURL, WebdavResource.NOACTION,
> DepthSupport.DEPTH_0);
>
> I do avoid the PROPFIND method; but I get this error message in the
> web
> server error.log:
> "... request failed: error reading the headers"
>
> And my Put method fails.
>
> It seems that WebdavResource depends on a PROPFIND before a PUT
> method.
>
> Could someone please tell me how I could invoke a PUT without doing a
> PROPFIND method using the WebdavResource APIs?
>
> Thanks,
> Carlos Hung
>
>