Module: kamailio Branch: master Commit: 8cf756812292e623ac9119fae30911ad005059fa URL: https://github.com/kamailio/kamailio/commit/8cf756812292e623ac9119fae30911ad005059fa
Author: Kamailio Dev <kamailio....@kamailio.org> Committer: Kamailio Dev <kamailio....@kamailio.org> Date: 2024-03-11T07:32:22+01:00 modules: readme files regenerated - http_client ... [skip ci] --- Modified: src/modules/http_client/README --- Diff: https://github.com/kamailio/kamailio/commit/8cf756812292e623ac9119fae30911ad005059fa.diff Patch: https://github.com/kamailio/kamailio/commit/8cf756812292e623ac9119fae30911ad005059fa.patch --- diff --git a/src/modules/http_client/README b/src/modules/http_client/README index 6ffe4cab0cd..f0892dcc195 100644 --- a/src/modules/http_client/README +++ b/src/modules/http_client/README @@ -74,6 +74,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) + 4.6. http_client_request(url, met, body, hdrs, respv) 5. Pseudovariables @@ -132,6 +133,7 @@ Hugh Waite 1.25. http_get_redirect() usage 1.26. http_client_query() usage 1.27. http_client_get() usage + 1.28. http_client_request() usage Chapter 1. Admin Guide @@ -175,6 +177,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) + 4.6. http_client_request(url, met, body, hdrs, respv) 5. Pseudovariables @@ -702,6 +705,7 @@ modparam("http_client", "netinterface", "eth0") 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.6. http_client_request(url, met, body, hdrs, respv) 4.1. http_connect(connection, url, [content_type, data,] result) @@ -872,6 +876,24 @@ switch ($rc) { } ... +4.6. http_client_request(url, met, body, hdrs, respv) + + Perform a HTTP request to "url", storing the response body in the + "respv" variable. The method of the request is set by "met". The "body" + and "hdrs" can be empty strings to skip setting them. The first four + parameters can contain variables that are evaluated at runtime. The + "respv" has to be the name of a writable variable. + + Example 1.28. http_client_request() usage +... +http_client_request("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) _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org