Skip to content

Instantly share code, notes, and snippets.

@basz
Last active March 8, 2016 13:38
Show Gist options
  • Save basz/0408e7e72d4458afb008 to your computer and use it in GitHub Desktop.
Save basz/0408e7e72d4458afb008 to your computer and use it in GitHub Desktop.
http --form POST https://api-plhw-development.s01.localhost:443/oauth/token grant_type="password" username="xxx" password="xxx" Origin:http://localhost:4200 --verify=no --style=friendly
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 1383
Content-Type: text/html; charset=UTF-8
Date: Mon, 07 Mar 2016 23:16:59 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept-Encoding
Zend\Stratigility\Http\Request::__set_state(array(
'originalRequest' =>
Zend\Diactoros\ServerRequest::__set_state(array(
'attributes' =>
array (
),
'cookieParams' =>
array (
),
'parsedBody' =>
array (
'grant_type' => 'password',
'username' => 'xxx',
'password' => 'xxx',
),
'queryParams' =>
array (
),
'serverParams' =>
array (
'APP_ENV' => 'development',
'USER' => 'api-plhw-development',
'HOME' => '/home-projects/api-plhw-development',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/oauth/token',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'POST',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/oauth/token',
'REMOTE_PORT' => '60030',
'SCRIPT_FILENAME' => '/home-projects/api-plhw-development/deploy/current/public/index.php',
'SERVER_ADMIN' => 'support@plhw.nl',
'CONTEXT_DOCUMENT_ROOT' => '/home-projects/api-plhw-development/deploy/current/public',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'https',
'DOCUMENT_ROOT' => '/home-projects/api-plhw-development/deploy/current/public',
'REMOTE_ADDR' => '192.168.33.1',
'SERVER_PORT' => '443',
'SERVER_ADDR' => '192.168.33.10',
'SERVER_NAME' => 'api-plhw-development.s01.localhost',
'SERVER_SOFTWARE' => 'Apache/2.4.18 (Ubuntu)',
'SERVER_SIGNATURE' => '<address>Apache/2.4.18 (Ubuntu) Server at api-plhw-development.s01.localhost Port 443</address>
',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'CONTENT_TYPE' => 'application/x-www-form-urlencoded; charset=utf-8',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_USER_AGENT' => 'HTTPie/0.9.3',
'HTTP_ACCEPT' => '*/*',
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
'CONTENT_LENGTH' => '68',
'HTTP_ORIGIN' => 'http://localhost:4200',
'HTTP_HOST' => 'api-plhw-development.s01.localhost',
'proxy-nokeepalive' => '1',
'SSL_TLS_SNI' => 'api-plhw-development.s01.localhost',
'HTTPS' => 'on',
'REDIRECT_STATUS' => '200',
'REDIRECT_SSL_TLS_SNI' => 'api-plhw-development.s01.localhost',
'REDIRECT_HTTPS' => 'on',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => 1457392619.961163,
'REQUEST_TIME' => 1457392619,
),
'uploadedFiles' =>
array (
),
'headers' =>
array (
'content-type' =>
array (
0 => 'application/x-www-form-urlencoded; charset=utf-8',
),
'connection' =>
array (
0 => 'keep-alive',
),
'user-agent' =>
array (
0 => 'HTTPie/0.9.3',
),
'accept' =>
array (
0 => '*/*',
),
'accept-encoding' =>
array (
0 => 'gzip, deflate',
),
'content-length' =>
array (
0 => '68',
),
'origin' =>
array (
0 => 'http://localhost:4200',
),
'host' =>
array (
0 => 'api-plhw-development.s01.localhost',
),
),
'headerNames' =>
array (
'content-type' => 'content-type',
'connection' => 'connection',
'user-agent' => 'user-agent',
'accept' => 'accept',
'accept-encoding' => 'accept-encoding',
'content-length' => 'content-length',
'origin' => 'origin',
'host' => 'host',
),
'protocol' => '1.1',
'stream' =>
Zend\Diactoros\PhpInputStream::__set_state(array(
'cache' => '',
'reachedEof' => false,
'resource' => NULL,
'stream' => 'php://input',
)),
'method' => 'POST',
'requestTarget' => NULL,
'uri' =>
Zend\Diactoros\Uri::__set_state(array(
'allowedSchemes' =>
array (
'http' => 80,
'https' => 443,
),
'scheme' => 'https',
'userInfo' => '',
'host' => 'api-plhw-development.s01.localhost',
'port' => NULL,
'path' => '/oauth/token',
'query' => '',
'fragment' => '',
'uriString' => NULL,
)),
)),
'psrRequest' =>
Zend\Diactoros\ServerRequest::__set_state(array(
'attributes' =>
array (
'originalUri' =>
Zend\Diactoros\Uri::__set_state(array(
'allowedSchemes' =>
array (
'http' => 80,
'https' => 443,
),
'scheme' => 'https',
'userInfo' => '',
'host' => 'api-plhw-development.s01.localhost',
'port' => NULL,
'path' => '/oauth/token',
'query' => '',
'fragment' => '',
'uriString' => NULL,
)),
),
'cookieParams' =>
array (
),
'parsedBody' =>
array (
'grant_type' => 'password',
'username' => 'xxx',
'password' => 'xxx',
),
'queryParams' =>
array (
),
'serverParams' =>
array (
'APP_ENV' => 'development',
'USER' => 'api-plhw-development',
'HOME' => '/home-projects/api-plhw-development',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/oauth/token',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'POST',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/oauth/token',
'REMOTE_PORT' => '60030',
'SCRIPT_FILENAME' => '/home-projects/api-plhw-development/deploy/current/public/index.php',
'SERVER_ADMIN' => 'xxx@xxx.nl',
'CONTEXT_DOCUMENT_ROOT' => '/home-projects/api-plhw-development/deploy/current/public',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'https',
'DOCUMENT_ROOT' => '/home-projects/api-plhw-development/deploy/current/public',
'REMOTE_ADDR' => '192.168.33.1',
'SERVER_PORT' => '443',
'SERVER_ADDR' => '192.168.33.10',
'SERVER_NAME' => 'api-plhw-development.s01.localhost',
'SERVER_SOFTWARE' => 'Apache/2.4.18 (Ubuntu)',
'SERVER_SIGNATURE' => '<address>Apache/2.4.18 (Ubuntu) Server at api-plhw-development.s01.localhost Port 443</address>
',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'CONTENT_TYPE' => 'application/x-www-form-urlencoded; charset=utf-8',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_USER_AGENT' => 'HTTPie/0.9.3',
'HTTP_ACCEPT' => '*/*',
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
'CONTENT_LENGTH' => '68',
'HTTP_ORIGIN' => 'http://localhost:4200',
'HTTP_HOST' => 'api-plhw-development.s01.localhost',
'proxy-nokeepalive' => '1',
'SSL_TLS_SNI' => 'api-plhw-development.s01.localhost',
'HTTPS' => 'on',
'REDIRECT_STATUS' => '200',
'REDIRECT_SSL_TLS_SNI' => 'api-plhw-development.s01.localhost',
'REDIRECT_HTTPS' => 'on',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => 1457392619.961163,
'REQUEST_TIME' => 1457392619,
),
'uploadedFiles' =>
array (
),
'headers' =>
array (
'content-type' =>
array (
0 => 'application/x-www-form-urlencoded; charset=utf-8',
),
'connection' =>
array (
0 => 'keep-alive',
),
'user-agent' =>
array (
0 => 'HTTPie/0.9.3',
),
'accept' =>
array (
0 => '*/*',
),
'accept-encoding' =>
array (
0 => 'gzip, deflate',
),
'content-length' =>
array (
0 => '68',
),
'origin' =>
array (
0 => 'http://localhost:4200',
),
'Host' =>
array (
0 => 'api-plhw-development.s01.localhost',
),
),
'headerNames' =>
array (
'content-type' => 'content-type',
'connection' => 'connection',
'user-agent' => 'user-agent',
'accept' => 'accept',
'accept-encoding' => 'accept-encoding',
'content-length' => 'content-length',
'origin' => 'origin',
'host' => 'Host',
),
'protocol' => '1.1',
'stream' =>
Zend\Diactoros\PhpInputStream::__set_state(array(
'cache' => '',
'reachedEof' => false,
'resource' => NULL,
'stream' => 'php://input',
)),
'method' => 'POST',
'requestTarget' => NULL,
'uri' =>
Zend\Diactoros\Uri::__set_state(array(
'allowedSchemes' =>
array (
'http' => 80,
'https' => 443,
),
'scheme' => 'https',
'userInfo' => '',
'host' => 'api-plhw-development.s01.localhost',
'port' => NULL,
'path' => '',
'query' => '',
'fragment' => '',
'uriString' => NULL,
)),
)),
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment