diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 42f87fc..68d335c 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -168,7 +168,7 @@ protected function getRunningClient() } /** - * 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 * sendGET('test-headers.php'); * // ... * $I->deleteHeader('X-Requested-With'); - * $I->sendPOST('some-other-page.php'); - * ?> + * $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($name) + public function deleteHeader(string $name): void { $this->connectionModule->deleteHeader($name); } + + /** + * @deprecated Use [unsetHttpHeader](#unsetHttpHeader) instead + */ + public function deleteHeader($name) + { + $this->unsetHttpHeader($name); + } /** * Checks over the given HTTP header and (optionally)