curl-library
RE: Using libcurl for realtime transactions
Date: Thu, 20 Dec 2007 10:58:12 -0500
Thanks MB, this is a big help, I think.
Here's my command line:
curl https://somewhere.com/post.aspx -F "wsUSerID=XYZ" -F "wsPassword=123"
-F "wsMessageType=X12" -F "wsRequest=REALTIME REQUEST MESSAGE"
Here's the output generated for my command line using the --libcurl option:
(I didn't want to list it all, but had some basic questions)
1) It doesn't appear to use multi-part forms, it looks like it just takes
the entire command line in CURLOPT_WRITEDATA, true?
int main(int argc, char *argv[])
{
CURLcode ret;
CURL *hnd = curl_easy_init();
/* curl_easy_setopt(hnd, CURLOPT_WRITEDATA, 0x22fed8); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, 0x401b6b); [REMARK] */
2) Is the response available at the CURLOPT_READDATA address or via the
function pointed to by CURLOPT_READFUNCTION?
/* curl_easy_setopt(hnd, CURLOPT_READDATA, 0x22ff20); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_READFUNCTION, 0x4017de); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_IOCTLDATA, 0x22ff20); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_IOCTLFUNCTION, 0x40176b); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)-1);
curl_easy_setopt(hnd, CURLOPT_URL, "https://somewhere.com/post.aspx");
:
:
:
ret = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
}
Thanks in advance.
Received on 2007-12-20