Skip to content

Commit

Permalink
fix httpbin.org hostname in psr7.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wang committed Aug 16, 2015
1 parent b72736a commit 01d19a0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/psr7.rst
Expand Up @@ -224,7 +224,7 @@ When creating a request, you can provide the URI as a string or an instance of

.. code-block:: php
$response = $client->get('http://httbin.org/get?q=foo');
$response = $client->get('http://httpbin.org/get?q=foo');
Scheme
Expand All @@ -236,9 +236,9 @@ scheme can be set to "http" or "https".

.. code-block:: php
$request = $client->createRequest('GET', 'http://httbin.org');
$request = $client->createRequest('GET', 'http://httpbin.org');
echo $request->getUri()->getScheme(); // http
echo $request->getUri(); // http://httpbin.com/get
echo $request->getUri(); // http://httpbin.org/get
Host
Expand All @@ -249,7 +249,7 @@ Host header.

.. code-block:: php
$request = new Request('GET', 'http://httbin.org');
$request = new Request('GET', 'http://httpbin.org');
echo $request->getUri()->getHost(); // httpbin.org
echo $request->getHeader('Host'); // httpbin.org
Expand All @@ -261,9 +261,9 @@ No port is necessary when using the "http" or "https" schemes.

.. code-block:: php
$request = $client->createRequest('GET', 'http://httbin.org:8080');
$request = $client->createRequest('GET', 'http://httpbin.org:8080');
echo $request->getUri()->getPort(); // 8080
echo $request->getUri(); // https://httpbin.com:8080
echo $request->getUri(); // https://httpbin.org:8080
Path
Expand All @@ -273,7 +273,7 @@ The path of a request is accessible via the URI object.

.. code-block:: php
$request = new Request('GET', 'http://httbin.org/get');
$request = new Request('GET', 'http://httpbin.org/get');
echo $request->getUri()->getPath(); // /get
The contents of the path will be automatically filtered to ensure that only
Expand All @@ -290,7 +290,7 @@ URI object owned by the request.

.. code-block:: php
$request = new Request('GET', 'http://httbin.org/?foo=bar');
$request = new Request('GET', 'http://httpbin.org/?foo=bar');
echo $request->getUri()->getQuery(); // foo=bar
The contents of the query string will be automatically filtered to ensure that
Expand Down

0 comments on commit 01d19a0

Please sign in to comment.