Skip to content

Commit 9eac667

Browse files
authored
add a way to set or clean server parameters
1 parent a34a92b commit 9eac667

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Codeception/Module/REST.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,4 +1508,29 @@ public function startFollowingRedirects()
15081508
{
15091509
$this->client->followRedirects(true);
15101510
}
1511+
1512+
/**
1513+
* Sets SERVER parameters valid for all next requests.
1514+
* this will remove old ones.
1515+
*
1516+
* ```php
1517+
* $I->setServerParameters([]);
1518+
* ```
1519+
*/
1520+
public function setServerParameters(array $params)
1521+
{
1522+
$this->client->setServerParameters($params);
1523+
}
1524+
1525+
/**
1526+
* Sets SERVER parameter valid for all next requests.
1527+
*
1528+
* ```php
1529+
* $I->haveServerParameter('name', 'value');
1530+
* ```
1531+
*/
1532+
public function haveServerParameter($name, $value)
1533+
{
1534+
$this->client->setServerParameter($name, $value);
1535+
}
15111536
}

0 commit comments

Comments
 (0)