wpoets / curl-handler
Handler for sending curl request in Awesome Enterprise
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 1
Type:awesome-handler
Requires
- php: >=7.4
- composer/installers: ~1.0
- oomphinc/composer-installers-extender: ^2.0
README
provides support for using curl via shortcodes
You can use the following command to include it using the composer
composer require wpoets/curl-handler
supported shortcodes
- curl.api.get
- curl.api.post
- curl.page.get
- curl.api.patch
[template.set url_two='https://wpoets.com/api' /]
[arr.create o.set='template.data']
[username _value='' /]
[password _value='' /]
[force_single_access]yes[/force_single_access]
[/arr.create]
[arr.create o.set='template.proxy']
[host _value=''/]
[port _value=''/]
[user _value=''/]
[password _value=''/]
[/arr.create]
[arr.create o.set='template.headers']
[header new]
[key _value=''/]
[val _value=''/]
[/header]
[/arr.create]
[curl.api.get url='{template.url_one}' o.set='template.urlone' c.ignore=t/]
[curl.api.get url='{template.url_two}' data='{template.data}' o.set='template.urltwo' c.ignore=t/]
[curl.api.post url='{template.url_two}' data='{template.data}' header='{template.headers}' proxy='{template.proxy}' o.set='template.urltwo' c.ignore=t/]
Support was also added to return cookies, with the response from v1.3 onwards.