Explorar o código

curl Fix documentation, remove local character

Olle E. Johansson %!s(int64=10) %!d(string=hai) anos
pai
achega
369f79b8a1
Modificáronse 2 ficheiros con 15 adicións e 7 borrados
  1. 8 4
      modules/curl/README
  2. 7 3
      modules/curl/doc/curl_admin.xml

+ 8 - 4
modules/curl/README

@@ -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
@@ -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)

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

@@ -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
@@ -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>