>> What's preventing you from simply using POST?
>
[quoted text clipped - 4 lines]
> megabytes, and passing them into a PostMethod object using Jakarta's
> addParameter method is going to fly.
I looked all over http://jakarta.apache.org/httpcomponents/index.html
and couldn't find an API reference, so I don't know what's available to you.
If I were doing this, I'd do it manually, forming the HTTP request header,
sending it to the socket, then maybe read 1024 bytes a at time from the
file, send that through the socket, read another 1024 bytes, send it, and so
on.
If Jakarta really "forces" you pre-load the entire file in memory, and
if that goes against your requirements, I guess you have no choice but to
dump Jakarta; at least for this particular feature.
- Oliver
slippymississippi@yahoo.com - 24 Mar 2006 21:17 GMT
> I looked all over
Yeah, I thought it was kinda wacky that they hide the javadocs from
you. You have to drill down into the developer's section to get to the
javadocs, IIRC.
Thanks!
Oliver Wong - 24 Mar 2006 22:06 GMT
>> I looked all over
>
> Yeah, I thought it was kinda wacky that they hide the javadocs from
> you. You have to drill down into the developer's section to get to the
> javadocs, IIRC.
See
http://svn.apache.org/repos/asf/jakarta/httpcomponents/trunk/http-core/src/examp
les/org/apache/http/examples/ElementalHttpPost.java
You can provide an InputStream to the request. So provide a
FileInputStream.
- Oliver
Roedy Green - 24 Mar 2006 22:13 GMT
> I looked all over http://jakarta.apache.org/httpcomponents/index.html
>and couldn't find an API reference,
see http://jakarta.apache.org/commons/httpclient/apidocs/index.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Oliver Wong - 24 Mar 2006 22:25 GMT
>> I looked all over http://jakarta.apache.org/httpcomponents/index.html
>>and couldn't find an API reference,
>
> see http://jakarta.apache.org/commons/httpclient/apidocs/index.html
Thanks. I see now the API for PostMethod, and its insistence of
receiving pairs of strings as ("name","value) pairs that Slippy was
complaining about.
I took a look at the code at
http://svn.apache.org/repos/asf/jakarta/httpcomponents/trunk/http-core/src/examp
les/org/apache/http/examples/ElementalHttpPost.java
to see how they did things differently, and it looks like they are using the
org.apache.http.message.HttpPost and org.apache.http.HttpEntity classes
which don't see to be covered by the "org.apache.commons.httpclient" set of
javadocs.
- Oliver