commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Law" <m...@mlbm.co.uk>
Subject RE: [httpclient] How to post data without a parameter name?
Date Wed, 19 Feb 2003 20:18:42 GMT

Try setRequestBody().... Takes a string, inputstream etc.

Matt.

-----Original Message-----
From: Kenny Smith [mailto:tomcat-user@journalscape.com] 
Sent: Thursday, 20 February 2003 5:51 AM
To: commons-user@jakarta.apache.org
Subject: [httpclient] How to post data without a parameter name?


Hi all,

I'm porting a legacy perl app to Java and I'm having some trouble 
figuring out how to use the PostMethod class. The legacy app does 
something similar to:

------------ snip ---------------
POST / HTTP/1.1
Host: myhost.atwork.com
Content-Type: text/xml
Content-Length: 3456
Connection: close

<?xml version="1.0"?>

<myroot>
    ...
</myroot>

------------ snip ---------------

However, I can't find any sort of methods on the PostMethod to just set 
the content of the request, only for setting named parameters. Am I 
looking in the wrong place?

Any help is appreciated.
Thanks,
Kenny Smith
JournalScape.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



Mime
View raw message