[sr-dev] git:master:58468c3a: modules: readme files regenerated - http_client ... [skip ci]

Kamailio Dev kamailio.dev at kamailio.org
Mon Dec 21 10:31:46 CET 2020


Module: kamailio
Branch: master
Commit: 58468c3ac6cbfcf426e2f7a89d2becbec09aac32
URL: https://github.com/kamailio/kamailio/commit/58468c3ac6cbfcf426e2f7a89d2becbec09aac32

Author: Kamailio Dev <kamailio.dev at kamailio.org>
Committer: Kamailio Dev <kamailio.dev at kamailio.org>
Date: 2020-12-21T10:31:37+01:00

modules: readme files regenerated - http_client ... [skip ci]

---

Modified: src/modules/http_client/README

---

Diff:  https://github.com/kamailio/kamailio/commit/58468c3ac6cbfcf426e2f7a89d2becbec09aac32.diff
Patch: https://github.com/kamailio/kamailio/commit/58468c3ac6cbfcf426e2f7a89d2becbec09aac32.patch

---

diff --git a/src/modules/http_client/README b/src/modules/http_client/README
index 6724cc5716..0028f9e623 100644
--- a/src/modules/http_client/README
+++ b/src/modules/http_client/README
@@ -72,6 +72,7 @@ Hugh Waite
 
               4.3. http_get_redirect(connection, result)
               4.4. http_client_query(url, [post-data], [hdrs], result)
+              4.5. http_client_get(url, body, hdrs, respv)
 
         5. Pseudovariables
 
@@ -128,6 +129,7 @@ Hugh Waite
    1.23. http_connect_raw() usage
    1.24. http_get_redirect() usage
    1.25. http_client_query() usage
+   1.26. http_client_get() usage
 
 Chapter 1. Admin Guide
 
@@ -169,6 +171,7 @@ Chapter 1. Admin Guide
 
         4.3. http_get_redirect(connection, result)
         4.4. http_client_query(url, [post-data], [hdrs], result)
+        4.5. http_client_get(url, body, hdrs, respv)
 
    5. Pseudovariables
 
@@ -670,6 +673,7 @@ modparam("http_client", "netinterface", "eth0")
    4.2. http_connect_raw(connection, url, content_type, data, result)
    4.3. http_get_redirect(connection, result)
    4.4. http_client_query(url, [post-data], [hdrs], result)
+   4.5. http_client_get(url, body, hdrs, respv)
 
 4.1.  http_connect(connection, url, [content_type, data,] result)
 
@@ -818,6 +822,28 @@ http_client_query("http://api.com/index.php", "src=$si",
     "Content-Type: text/plain", "$var(result)");
 ...
 
+4.5.  http_client_get(url, body, hdrs, respv)
+
+   Perform a HTTP GET request to "url", storing the response body in the
+   "respv" variable. The "body" and "hdrs" can be empty strings to skip
+   setting them. The first three parameters can contain variables that are
+   evaluated at runtime. The "respv" has to be the name of a writable
+   variable.
+
+   Note: usually HTTP GET requests should have no body, according to specs
+   the body in HTTP GET does not affect the response, but is not
+   explicitely forbidden.
+
+   Example 1.26. http_client_get() usage
+...
+http_client_get("http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(fu
+{s.escape.param})",
+           "", "X-Token: abc", "$var(result)");
+switch ($rc) {
+    ...
+}
+...
+
 5. Pseudovariables
 
    5.1. $curlerror(error)




More information about the sr-dev mailing list