|
@@ -41,7 +41,7 @@ Carsten Bock
|
|
|
3.8. tlscipherlist (string)
|
|
|
3.9. tlsverifypeer (int)
|
|
|
3.10. tlsverifyhost (int)
|
|
|
- 3.11. curlcon (string)
|
|
|
+ 3.11. httpcon (string)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -76,7 +76,7 @@ Carsten Bock
|
|
|
1.8. Set tlscipherlist parameter
|
|
|
1.9. Set tlsverifypeer parameter
|
|
|
1.10. Set tlsverifyhost parameter
|
|
|
- 1.11. Set curlcon parameter
|
|
|
+ 1.11. Set httpcon parameter
|
|
|
1.12. http_connect() usage
|
|
|
1.13. curl_http_query() usage
|
|
|
|
|
@@ -102,7 +102,7 @@ Chapter 1. Admin Guide
|
|
|
3.8. tlscipherlist (string)
|
|
|
3.9. tlsverifypeer (int)
|
|
|
3.10. tlsverifyhost (int)
|
|
|
- 3.11. curlcon (string)
|
|
|
+ 3.11. httpcon (string)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -173,7 +173,7 @@ Chapter 1. Admin Guide
|
|
|
3.8. tlscipherlist (string)
|
|
|
3.9. tlsverifypeer (int)
|
|
|
3.10. tlsverifyhost (int)
|
|
|
- 3.11. curlcon (string)
|
|
|
+ 3.11. httpcon (string)
|
|
|
|
|
|
3.1. httpredirect (int)
|
|
|
|
|
@@ -318,7 +318,7 @@ modparam("http_client", "tlsverifypeer", 1)
|
|
|
modparam("http_client", "tlsverifyhost", 2)
|
|
|
...
|
|
|
|
|
|
-3.11. curlcon (string)
|
|
|
+3.11. httpcon (string)
|
|
|
|
|
|
Defines a connection and credentials for the connection for use in a
|
|
|
connection-oriented function call in this module.
|
|
@@ -327,7 +327,7 @@ modparam("http_client", "tlsverifyhost", 2)
|
|
|
<connection-name>=><schema>://[<username>:<password>@]<hostname/address
|
|
|
>[;param=value]
|
|
|
|
|
|
- The address in the URL is the base for the URL in the curlcon_query()
|
|
|
+ The address in the URL is the base for the URL in the http_connect()
|
|
|
call. The address given in the function call will be appended to the
|
|
|
base URL in the connection definition.
|
|
|
|
|
@@ -347,15 +347,14 @@ modparam("http_client", "tlsverifyhost", 2)
|
|
|
* verifyhost Set to 2 to enable or 0 to disable server hostname
|
|
|
verification. Overrides tlsverifyhost modparam.
|
|
|
|
|
|
- Example 1.11. Set curlcon parameter
|
|
|
+ Example 1.11. Set httpcon parameter
|
|
|
...
|
|
|
-modparam("http_client", "http_client.on", "apione=>http://atlanta.example.com")
|
|
|
-modparam("http_client", "http_client.on", "apitwo=>http://atlanta.example.com/ap
|
|
|
-i/12")
|
|
|
-modparam("http_client", "http_client.on", "apithree=>http://annabella:mysecret@a
|
|
|
-tlanta.example.com/api/12")
|
|
|
-modparam("http_client", "http_client.on", "apifour=>http://stockholm.example.com
|
|
|
-/api/getstuff;timeout=12")
|
|
|
+modparam("http_client", "httpcon", "apione=>http://atlanta.example.com")
|
|
|
+modparam("http_client", "httpcon", "apitwo=>http://atlanta.example.com/api/12")
|
|
|
+modparam("http_client", "httpcon", "apithree=>http://annabella:mysecret@atlanta.
|
|
|
+example.com/api/12")
|
|
|
+modparam("http_client", "httpcon", "apifour=>http://stockholm.example.com/api/ge
|
|
|
+tstuff;timeout=12")
|
|
|
...
|
|
|
|
|
|
4. Functions
|
|
@@ -367,8 +366,8 @@ modparam("http_client", "http_client.on", "apifour=>http://stockholm.example.com
|
|
|
|
|
|
Sends HTTP GET or POST request to a given connection. For a POST
|
|
|
request, content-type can be specified.
|
|
|
- * connection - the name of an existing curl connection, definied by a
|
|
|
- modparam.
|
|
|
+ * connection - the name of an existing HTTP connection, definied by a
|
|
|
+ httpcon modparam.
|
|
|
url - the part of the URL to add to the predefined URL in the
|
|
|
connection definition.
|
|
|
content_type - Used only when posting data with HTTP POST. An
|
|
@@ -387,8 +386,7 @@ modparam("http_client", "http_client.on", "apifour=>http://stockholm.example.com
|
|
|
|
|
|
Example 1.12. http_connect() usage
|
|
|
...
|
|
|
-modparam("http_client", "http_client.on", "apiserver=>http://kamailio.org/api/")
|
|
|
-;
|
|
|
+modparam("http_client", "httpcon", "apiserver=>http://kamailio.org/api/");
|
|
|
...
|
|
|
# POST Request
|
|
|
$var(res) = http_connect("apiserver", "/mailbox", "application/json", "{ ok, {20
|
|
@@ -462,7 +460,7 @@ switch ($retcode) {
|
|
|
|
|
|
6.1. httpclient.listcon
|
|
|
|
|
|
- Lists all defined connections
|
|
|
+ Lists all defined httpcon connections
|
|
|
|
|
|
Parameters:
|
|
|
* No parameters
|