[SR-Users] http_client module configuring User-Agent

Jurijs Ivolga jurijs.ivolga at gmail.com
Fri Jun 17 09:18:41 CEST 2016


Hi Olle,

Thank you for clarification.

I tried function http_connect and still no user-agent.

I'm not C programmer, but I checked code of module and I wasn't able to see
anywhere that you are setting up user-agent like this:

curl_easy_setopt(curl, CURLOPT_USERAGENT, "My user-agent");

With kind regards,


Jurijs

On Fri, Jun 17, 2016 at 9:48 AM, Olle E. Johansson <oej at edvina.net> wrote:

>
> On 16 Jun 2016, at 12:05, Jurijs Ivolga <jurijs.ivolga at gmail.com> wrote:
>
> Hi All,
>
> I tried today new module http_client. I just made GET request using
> http_client_query in following way:
>
> http_client_query("http://cool.api.com", "$var(result)");
>
> It is working, but I can't see User-Agent in request. Below you can find
> my module options:
>
> modparam("http_client", "useragent", "kamailio")
> modparam("http_client", "connection_timeout", 1)
>
> Is it a bug, or am I doing something wrong?
>
>
> That function works like the old http_query in utils. I should propably
> document that it’s limited.
> Use the functions that use the connection structure to get full
> functionality.
>
> /O
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160617/393d81fe/attachment.html>


More information about the sr-users mailing list