func_curl.c: Support custom http headers

When user wants to send json data, the default Content-Type header
is incorect (application/x-www-form-urlencoded). This patch allows
to set any custom headers so the Content-Type header can be
overriden. User can set multiple headers by multiple calls of
curlopt(). This approach is not consistent with other parameters,
but is more readable in dialplan than one call with multiple
headers.

ASTERISK-28613

Change-Id: I4dd68c3f4e25362ef941d73a3861f58348dcfbf9
This commit is contained in:
Martin Tomec
2019-11-07 17:54:06 +00:00
committed by Joshua Colp
parent e7320bbbf0
commit 37dcdd485a
2 changed files with 35 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
Subject: func_curl
A new parameter, httpheader, has been added to CURLOPT function. This parameter
allows to set custom http headers for subsequent calls off CURL function.
Any setting of headers will replace the default curl headers
(e.g. "Content-type: application/x-www-form-urlencoded")