瀏覽代碼

curl Add information about return value of curl_connect

Olle E. Johansson 10 年之前
父節點
當前提交
6cbc77a804
共有 2 個文件被更改,包括 11 次插入2 次删除
  1. 4 0
      modules/curl/README
  2. 7 2
      modules/curl/doc/curl_admin.xml

+ 4 - 0
modules/curl/README

@@ -294,6 +294,10 @@ content_type, data, result)
    Sends HTTP GET or POST request to a given connection. For a POST
    request, content-type can be specified.
 
+   The return value is the HTTP return code (if >=100) or the CURL error
+   code if below 100. See the $curlerror pseudovariable below for more
+   information about CURL error codes.
+
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
    FAILURE_ROUTE, and BRANCH_ROUTE.
 

+ 7 - 2
modules/curl/doc/curl_admin.xml

@@ -270,8 +270,13 @@ modparam("curl", "curlcon", "apifour=>http://stockholm.example.com/api/getstuff;
 				<function moreinfo="none">curl_connect(connection, url, content_type, data, result)</function>
 			</title>
 			<para>
-				Sends HTTP GET or POST request to a given connection. For a
-				POST request, content-type can be specified.
+			Sends HTTP GET or POST request to a given connection. For a
+			POST request, content-type can be specified.
+	    	        </para>
+			<para>
+			The return value is the HTTP return code (if >=100) or the
+			CURL error code if below 100. See the $curlerror pseudovariable
+			below for more information about CURL error codes.
 	    	        </para>
 			<para>
 			This function can be used from REQUEST_ROUTE,