I haven’t tested this with multiple headers actually. It’s an interesting question, but I’m not sure that it is
supported. You propably will have to dive into libcurl docs to find out.

If I find time later this week, I’ll try to test it myself.

Cheers,
/O

On 17 Oct 2018, at 22:01, eyas barhouk <eyas37@hotmail.com> wrote:

thanks dear Alex 

i tried this function "http_client_query(url, [post-data], [hdrs], result)" but there is no example about how to use more than one header . 

if you can send me an example about how to setup the query with two headers like "content type" & "Authentication "
i will be thankful .

 




From: sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Alex Balashov <abalashov@evaristesys.com>
Sent: Wednesday, October 17, 2018 7:56 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] HTTP Post with JSON
 
On Wed, Oct 17, 2018 at 07:53:21PM +0000, eyas barhouk wrote:

> Hello Dears
> 
> 
> i'm trying to send POST HTTP request with JSON content on Kamailio V 5.2.0.
> i have two main headers "content type" & "Authentication " in addition i have the json content .
> when i'm using curl request it look like :
> 
> Curl -H "Authentication ket = xxxxx" -H "content type : JSON" -d " {the JSON content}"https://xxxxx.com/send
> 
> So how can i use the Http_client module to send such requests ??

The answer smiles out at you in the documentation:

https://kamailio.org/docs/modules/5.1.x/modules/http_client.html#http_client.f.http_query

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users