Skip to content

Commit

Permalink
curl Fix documentation, remove local character
Browse files Browse the repository at this point in the history
  • Loading branch information
oej committed Oct 2, 2015
1 parent 889a82f commit 369f79b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
12 changes: 8 additions & 4 deletions modules/curl/README
Expand Up @@ -119,6 +119,9 @@ Chapter 1. Admin Guide

1. Overview

Note: This module is still in development. Not all options documented
here work yet.

This module implements protocol functions that use the libcurl library
to fetch data from external HTTP servers or post data to HTTP servers.
The module is using a concept of "connections" to define properties of
Expand Down Expand Up @@ -303,12 +306,13 @@ content_type, data, result)

Example 1.9. curl_connect() usage
...
modparam("curl", "curlcon", "anders=>http://kamailio.org/api/");
modparam("curl", "curlcon", "apiserver=>http://kamailio.org/api/");
...
# POST Request
$var(res) = curl_connect("apiserver", "/postlåda", "application/json", "{ ok, {
200, ok}}", "$avp(gurka)");
xlog("L_INFO", "API-server Curl connection: $avp(gurka) Result $var(res)\n");
$var(res) = curl_connect("apiserver", "/mailbox", "application/json", "{ ok, {20
0, ok}}", "$avp(gurka)");
xlog("L_INFO", "API-server Curl connection: $avp(gurka) Result code $var(res)\n"
);
...

4.2. curl_http_query(url, [post-data], result)
Expand Down
10 changes: 7 additions & 3 deletions modules/curl/doc/curl_admin.xml
Expand Up @@ -16,6 +16,10 @@
<section>
<title>Overview</title>
<para>
Note: This module is still in development. Not all options documented
here work yet.
</para>
<para>
This module implements protocol functions that use the libcurl library
to fetch data from external HTTP servers or post data to HTTP servers.
The module is using a concept of "connections" to define properties
Expand Down Expand Up @@ -286,11 +290,11 @@ modparam("curl", "curlcon", "apifour=>http://stockholm.example.com/api/getstuff;
<title><function>curl_connect()</function> usage</title>
<programlisting format="linespecific">
...
modparam("curl", "curlcon", "anders=>http://kamailio.org/api/");
modparam("curl", "curlcon", "apiserver=>http://kamailio.org/api/");
...
# POST Request
$var(res) = curl_connect("apiserver", "/postlåda", "application/json", "{ ok, {200, ok}}", "$avp(gurka)");
xlog("L_INFO", "API-server Curl connection: $avp(gurka) Result $var(res)\n");
$var(res) = curl_connect("apiserver", "/mailbox", "application/json", "{ ok, {200, ok}}", "$avp(gurka)");
xlog("L_INFO", "API-server Curl connection: $avp(gurka) Result code $var(res)\n");
...
</programlisting>
</example>
Expand Down

0 comments on commit 369f79b

Please sign in to comment.