CURL()
Synopsis
Retrieve content from a remote web or ftp server
Description
When this function is read, a HTTP GET
(by default) will be used to retrieve the contents of the provided url. The contents are returned as the result of the function.
Example: Displaying contents of a page
exten => s,1,Verbose(0, ${CURL(http://localhost:8088/static/astman.css)})
When this function is written to, a HTTP GET
will be used to retrieve the contents of the provided url. The value written to the function specifies the destination file of the cURL'd resource.
Example: Retrieving a file
exten => s,1,Set(CURL(http://localhost:8088/static/astman.css)=/var/spool/asterisk/tmp/astman.css))
Syntax
CURL(url,post-data)
Arguments
url
- The full URL for the resource to retrieve.post-data
- Read Only
If specified, anHTTP POST
will be performed with the content of post-data, instead of anHTTP GET
(default).
See Also
Import Version
This documentation was imported from Asterisk Version GIT-17-5dda6d4