mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 00:00:09 +00:00
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:
committed by
Joshua Colp
parent
e7320bbbf0
commit
37dcdd485a
6
doc/CHANGES-staging/func_curl_headers.txt
Normal file
6
doc/CHANGES-staging/func_curl_headers.txt
Normal 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")
|
||||
Reference in New Issue
Block a user