deleteHeader not supported by REST module #3161

mrtndwrd opened this Issue Jun 3, 2016 · 0 comments


None yet
1 participant

mrtndwrd commented Jun 3, 2016

The documentation of the REST module suggests using the "deleteHeader" function to undo the "haveHttpHeader" function: The deleteHeader function is however currently only implemented in the PhpBrowser module, which uses setHeader, which is ignored by the REST module.

Using deleteHeader after using haveHttpHeader does not seem to have any effect.

code sample:

$I = new ApiTester($scenario);
$I->wantTo("do two things");
$I->haveHttpHeader('Content-Type', 'application/json');
        'name' => 'action 1'

// Now do a sendDELETE, which should not have application/json in its header:


class_name: ApiTester
        - REST:
            url: http://localhost/api/v2/
            depends: PhpBrowser
            part: Json
        - PhpBrowser

Removing - PhpBrowser from the last line results in an error that function deleteHeader() does not exist.

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Jun 6, 2016

@DavertMik DavertMik closed this in #3183 Jun 7, 2016

DavertMik added a commit that referenced this issue Jun 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment