cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: post binary data using curlopt_postfields option

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 9 Jun 2010 10:50:57 +0200 (CEST)

On Tue, 8 Jun 2010, Vemana Yogi wrote:

> Btw, the below option worked but it started to fail after the content length
> was 1002. Is there any limit to how much data you can post using postfields
> option or some tweak is needed here?

No there's no such limit. You can post as much data as you please and that
fits in your memory. (And if you want to post more than what fits in memory
you can do that as well but not with that option.)

> As an alternative, I tried using this

> curl_formadd(

You most likely cannot just guess or pick method at random. If
CURLOPT_POSTFIELDS is the right option, curl_formadd and CURLOPT_HTTPPOST is
not. And vice versa.

> but I'm seeing application/json being sent across the wire..
>
> HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 400 Bad Request
> < Date: Wed, 09 Jun 2010 05:31:07 GMT
> < cache-control: public,must-revalidate
> < content-length: 138
> < content-type: application/json

That's the _response_ header. The server obviously sends that back.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-09

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET