Skip to content

Update REST.php #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Codeception/Module/REST.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public function haveHttpHeader($name, $value)
}

/**
* Deletes a HTTP header, so that subsequent requests will not send it anymore.
* Deletes a HTTP header (that was originally added by [haveHttpHeader()](#haveHttpHeader)),
* so that subsequent requests will not send it anymore.
*
* Example:
* ```php
Expand Down Expand Up @@ -429,6 +430,12 @@ public function amAWSAuthenticated($additionalAWSConfig = [])
* 'tmp_name' => codecept_data_dir('sample_file.pdf')
* ]
* ]);
* // If your field names contain square brackets (e.g. `<input type="text" name="form[task]">`),
* // PHP parses them into an array. In this case you need to pass the fields like this:
* $I->sendPOST('/add-task', ['form' => [
* 'task' => 'lorem ipsum',
* 'category' => 'miscellaneous',
* ]]);
* ```
*
* @param $url
Expand Down