Yes I've tried MultipartEntity. That works fine. But I want to send two
text parameters a 3rd parameter as a file.
Lets say A and B are the two text parameters
nvps.add(new BasicNameValuePair("A", "1"));
nvps.add(new BasicNameValuePair("B", "2"));
But C is a file...a text file at that.
nvps.add(new BasicNameValuePair("C", "big text file"));
Now I know that's not a good idea, but what is the correct way of doing
this?
Thanks!
olegk wrote:
>
> On Wed, 2010-01-20 at 08:54 -0800, nabbler101 wrote:
>> So I'm trying to pass a very large string (~15mb) as a parameter using
>> httppost but I'm getting an OutOfMemoryException. The heap size is set
>> to
>> 512-1024mb (which should be more than enough.)
>>
>> Is there a way around this problem? I'd appreciate any help.
>>
>
> What is the point of buffering 15mb of data in memory? Have you
> considered NOT buffering content of the file in memory?
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/UrlEncodedFormEntity-throws-OutOfMemoryError-exception-tp27244948p27257481.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]