Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
get ($url, $data=[], $headers=[]) | |
delete ($url, $headers=[]) | |
post ($url, $data, $headers=[]) | |
put ($url, $data, $headers=[]) | |
invokeApi ($url, $additionalCurlOpts, $headers=[]) | |
Data Fields | |
const | EMPTY_REQUEST_BODY = 'Empty body' |
Generic cURL client wrapper for get/delete/post/put requests
Definition at line 11 of file CurlClient.php.
delete | ( | $url, | |
$headers = [] |
|||
) |
Perform HTTP DELETE request
string | $url | |
array | $headers |
Definition at line 42 of file CurlClient.php.
get | ( | $url, | |
$data = [] , |
|||
$headers = [] |
|||
) |
Perform HTTP GET request
string | $url | Resource URL like /V1/Resource1/123 |
array | $data | |
array | $headers |
Definition at line 23 of file CurlClient.php.
invokeApi | ( | $url, | |
$additionalCurlOpts, | |||
$headers = [] |
|||
) |
Makes the REST api call using passed $curl object
string | $url | |
array | $additionalCurlOpts | cURL Options |
array | $headers |
Definition at line 98 of file CurlClient.php.
post | ( | $url, | |
$data, | |||
$headers = [] |
|||
) |
Perform HTTP POST request
string | $url | |
array | string | $data | |
array | $headers |
Definition at line 59 of file CurlClient.php.
put | ( | $url, | |
$data, | |||
$headers = [] |
|||
) |
Perform HTTP PUT request
string | $url | |
array | string | $data | |
array | $headers |
Definition at line 78 of file CurlClient.php.
const EMPTY_REQUEST_BODY = 'Empty body' |
Definition at line 13 of file CurlClient.php.