cURL / Mailing Lists / curl-library / Single Mail

curl-library

Fwd: Often error 23

From: Marco A. Cruz Quevedo <macruzq_at_gmail.com>
Date: Wed, 18 Dec 2013 10:55:43 -0600

I am using libcurl.dll through FoxPro but I receive error 23 very often.
The code is the following:

---
curl_global_init(CURL_GLOBAL_ALL)
hcurl = curl_easy_init()
if hcurl>0
    *-- prepare data
    post_dat="dd=dummy&"+http_post(@aregistro)
    *--
    fh=fcreate("post.dat")
    fwrite(fh,post_dat)
    fclose(fh)
    ?"-- valid handle",hcurl
    curl_easy_setopt(hcurl, CURLOPT_URL, _url)
    curl_easy_setopt(hcurl, CURLOPT_POSTFIELDS, post_dat)
    rv = curl_easy_perform(hcurl)
    if rv=CURLE_OK
    ?"OK, resultado: ",rv
    else
    *-- display error
        wait window "*** URL_LIB Error:"+str(rv,6,0)
    endif
    curl_easy_cleanup(hcurl)
else
    ?"*** invalid handle"
endif
endfunc
---
Documentation indicates:
CURLE_WRITE_ERROR (23)
An error occurred when writing received data to a local file, or an error
was returned to libcurl from a write callback.
How do I set a file to receive any output as result of curl_easy_perform()
function?
I will appreciate your response.
Regards,
Marco.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-18