From: Jonathan Rose Date: Thu, 2 Feb 2012 18:31:37 +0000 (+0000) Subject: Backports some documentation for func_curl from 10 to 1.8 X-Git-Tag: 1.8.11.0-rc1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=749b33018eb369e465c1c572e431a68dbabee7f4;p=thirdparty%2Fasterisk.git Backports some documentation for func_curl from 10 to 1.8 For some reason this function was completely undocumented in 1.8. I copied the 10 docs over to 1.8 and removed references to an enumerator that was added in the Asterisk 10 version of func_curl. That was the only change I noted. (closes issue ASTERISK-19186) Reported by: Olivier Krief git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@353818 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 1a14ddca49..130d5a6240 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -51,6 +51,113 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/threadstorage.h" +/*** DOCUMENTATION + + + Retrieve content from a remote web or ftp server + + + + + If specified, an HTTP POST will be + performed with the content of + post-data, instead of an + HTTP GET (default). + + + + + CURLOPT + + + + + Sets various options for future invocations of CURL. + + + + + + A cookie to send with the request. Multiple + cookies are supported. + + + Number of seconds to wait for a connection to succeed + + + Number of seconds to wait for DNS to be resolved + + + For FTP URIs, force a text transfer (boolean) + + + For FTP URIs, number of seconds to wait for a + server response + + + Include header information in the result + (boolean) + + + For HTTP(S) URIs, number of seconds to wait for a + server response + + + Maximum number of redirects to follow + + + Hostname or IP address to use as a proxy server + + + Type of proxy + + + + + + + + Port number of the proxy + + + A username:password + combination to use for authenticating requests through a + proxy + + + Referer URL to use for the request + + + UserAgent string to use for the request + + + A username:password + to use for authentication when the server response to + an initial request indicates a 401 status code. + + + Whether to verify the server certificate against + a list of known root certificate authorities (boolean). + + + Assuming the responses will be in key1=value1&key2=value2 + format, reformat the response such that it can be used + by the HASH function. + + + + + + Options may be set globally or per channel. Per-channel + settings will override global settings. + + + CURL + HASH + + + ***/ + #define CURLVERSION_ATLEAST(a,b,c) \ ((LIBCURL_VERSION_MAJOR > (a)) || ((LIBCURL_VERSION_MAJOR == (a)) && (LIBCURL_VERSION_MINOR > (b))) || ((LIBCURL_VERSION_MAJOR == (a)) && (LIBCURL_VERSION_MINOR == (b)) && (LIBCURL_VERSION_PATCH >= (c))))