mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-20 05:53:31 -04:00
19 lines
299 B
PHP
Executable File
19 lines
299 B
PHP
Executable File
<?php
|
|
|
|
$request = new HttpRequest();
|
|
$request->setUrl('http://mockbin.com/har');
|
|
$request->setMethod(HTTP_METH_POST);
|
|
|
|
$request->setCookies(array(
|
|
'bar' => 'baz',
|
|
'foo' => 'bar'
|
|
));
|
|
|
|
try {
|
|
$response = $request->send();
|
|
|
|
echo $response->getBody();
|
|
} catch (HttpException $ex) {
|
|
echo $ex;
|
|
}
|