mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-20 05:53:31 -04:00
18 lines
326 B
PHP
Executable File
18 lines
326 B
PHP
Executable File
<?php
|
|
|
|
$client = new http\Client;
|
|
$request = new http\Client\Request;
|
|
|
|
$request->setRequestUrl('http://mockbin.com/har');
|
|
$request->setRequestMethod('POST');
|
|
|
|
$client->setCookies(array(
|
|
'bar' => 'baz',
|
|
'foo' => 'bar'
|
|
));
|
|
|
|
$client->enqueue($request)->send();
|
|
$response = $client->getResponse();
|
|
|
|
echo $response->getBody();
|