Skip to content

Commit e3d6e9f

Browse files
authored
Merge pull request #23 from ThomasLandauer/patch-2
Update REST.php
2 parents 308d1b7 + 2b92dcf commit e3d6e9f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Codeception/Module/REST.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ public function haveHttpHeader($name, $value)
188188
}
189189

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

0 commit comments

Comments
 (0)