cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: RE: what does curl post

From: fancy_2626 <fancy_2626_at_163.com>
Date: Fri, 26 Oct 2012 19:31:09 -0700

I had tried (long)len before I post. It didn't work.
The CURLINFO_HEADER_IN looks OK, starting with HTTP/1.1 200 OK.
CURLINFO_DATA_IN returns exact the source page (like what I got by 'GET').



发件人:Gary Maxwell
发送时间:2012-10-26 19:24
主题:Re: RE: what does curl post
收件人:"libcurl development"<curl-library_at_cool.haxx.se>
抄送:

> From:fancy_2626
> Sent: Friday, October 26, 2012 18:24
> Subject: Re: RE: what does curl post
>
> Hello! I still need help to make my post work.
>
> microRNAs=hsa-miR-
> 9&Genes=NM_001004317ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
> ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
> ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
> ÍÍÍÍýýýý««««««««îþ
>
>
> int main(void) {
> int len;
> CURL *curl;
> CURLcode res;
> static char *postthis="microRNAs=hsa-miR-9&Genes=NM_001004317";

> curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);

I would try the following:

curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)len);

Read the documentation for curl_easy_setopt() to see why.
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

You should also check the status returns from all of your curl calls.

Cheers,

GaryM @ Broadsoft

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-27