<div dir="ltr"><div>Hi folks, <br><br></div><div>I am using <br><br></div>I was trying to send http POST request to my web server <a href="http://example.com">example.com</a> following example <a href="https://www.kamailio.org/docs/modules/5.0.x/modules/http_async_client.html#http_async_client.f.http_async_query">Example 1.12. http_async_query() usage</a><div><div><br><a href="https://www.kamailio.org/docs/modules/5.0.x/modules/http_async_client.html">https://www.kamailio.org/docs/modules/5.0.x/modules/http_async_client.html</a><br><br></div><div>according to that we should send parameters in body like<br><pre class="gmail-programlisting" style="font-family:monospace;white-space:pre;background-color:rgb(252,255,252);border-width:1px;border-style:solid;border-color:rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font size="2"># POST
$http_req(body) = "{'r_uri':'" + $rU + "', 'f_uri':'" + $fU + "'}";
http_async_query("<a href="http://example.com/test.php">http://example.com/test.php</a>", "HTTP_REPLY");</font></pre></div><div>But its not working out of the box as described with error message from server:<br><br><font size="2"><span style="font-family:garamond,serif"><span style="background-color:rgb(207,226,243)">INFO: <script>: route[HTTP_REPLY]: status 400<br>INFO: <script>: route[HTTP_REPLY]: body Insufficient parameters.</span></span><span style="font-family:monospace,monospace"><br></span></font><br></div><div>I even tried adding additional parameters<br>  <span style="font-family:times new roman,serif">$http_req(hdr) = "Content-Type: application/x-www-form-urlencoded";     <br>  $http_req(method) = "POST";</span> <br></div><div><br>But again it didn't work.<br></div><div><br></div><div>I tried the alternative way which worked fine.<br></div><div style="text-align:left"><pre class="gmail-programlisting" style="font-family:monospace;white-space:pre;background-color:rgb(252,255,252);border-width:1px;border-style:solid;border-color:rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font size="2"># POST
$http_req(body) = "r_uri=$rU&f_uri=$fU";
http_async_query("<a href="http://example.com/test.php">http://example.com/test.php</a>", "HTTP_REPLY"); </font><br></pre></div><div>Is there any issue with documentation or i am missing something for POST request?<br></div><div><br clear="all"><div><div class="gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445</span></span></font></div></div>
</div></div></div>