diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index d75b464..a3c7c16 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -201,7 +201,7 @@ protected function getRunningClient(): AbstractBrowser } /** - * Sets a HTTP header to be used for all subsequent requests. Use [`deleteHeader`](#deleteHeader) to unset it. + * Sets a HTTP header to be used for all subsequent requests. Use [`unsetHttpHeader`](#unsetHttpHeader) to unset it. * * ```php * haveHttpHeader('X-Requested-With', 'Codeception'); * $I->sendGet('test-headers.php'); * // ... - * $I->deleteHeader('X-Requested-With'); + * $I->unsetHttpHeader('X-Requested-With'); * $I->sendPost('some-other-page.php'); * ``` * - * @param string $name the name of the header to delete. + * @param string $name the name of the header to unset. * @part json * @part xml */ - public function deleteHeader(string $name): void + public function unsetHttpHeader(string $name): void { $this->connectionModule->deleteHeader($name); } + + /** + * @deprecated Use [unsetHttpHeader](#unsetHttpHeader) instead + */ + public function deleteHeader(string $name): void + { + $this->unsetHttpHeader($name); + } /** * Checks over the given HTTP header and (optionally)