Removes an HTTP header from the cURL request.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The custom HTTP header to set. |
Returns
Type |
Description |
---|---|
A reference to the current instance. |
Examples
Add a custom header to the request, and then remove it (without firing it).
$http = new RequestCore('http://github.com/skyzyx/requestcore/raw/master/_tests/test_request.txt'); $http->prep_request(); $http->add_header('x-requestcore-header', 'value'); $http->remove_header('x-requestcore-header'); var_dump($http->request_headers);Result:
array(2) { ["Expect"]=> string(12) "100-continue" ["Connection"]=> string(5) "close" }
Source
Method defined in lib/requestcore/requestcore.class.php | Toggle source view (8 lines) | View on GitHub