• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with Apache Commons Http Client PUT method  RSS feed

 
Mani Venkatesan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if this is the right forum but here goes anyway...

I am using the Apache Commons Http client 2.0 to test my HTTP based service.
I use the PUT method like so

<code>
PutMethod putmethod = new PutMethod(sbuf.toString());
putmethod.setRequestBody("xyz");

//... execute method ...
</code>

I find that on the server side, when I read the servlet input stream, zero bytes are obtained.

Has anyone else seen and/or fixed this problem?

Thanks in advance,
Mani
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Common Problems

The PUT method is not widely supported on public servers due to security concerns and generally FTP is used to upload new and modified files to the webserver. Before executing a PUT method on a URL, it may be worth checking that PUT is supported using the OPTIONS method.
Jakarta Commons HttpClient - Put Method
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!