mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-23 07:38:58 -04:00
23 lines
346 B
PHP
Executable File
23 lines
346 B
PHP
Executable File
<?php
|
|
|
|
$request = new HttpRequest();
|
|
$request->setUrl('http://mockbin.com/har');
|
|
$request->setMethod(HTTP_METH_GET);
|
|
|
|
$request->setQueryData(array(
|
|
'foo' => array(
|
|
'bar',
|
|
'baz'
|
|
),
|
|
'baz' => 'abc',
|
|
'key' => 'value'
|
|
));
|
|
|
|
try {
|
|
$response = $request->send();
|
|
|
|
echo $response->getBody();
|
|
} catch (HttpException $ex) {
|
|
echo $ex;
|
|
}
|