Skip to content

Commit b261bba

Browse files
committed
cleanups
1 parent d1d15e4 commit b261bba

11 files changed

+52
-106
lines changed

conf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
# The name of an image file (within the static path) to use as favicon of the
148148
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
149149
# pixels large.
150-
#html_favicon = None
150+
html_favicon = 'favicon.ico'
151151

152152
# Add any paths that contain custom static files (such as style sheets) here,
153153
# relative to this directory. They are copied after the builtin static files,
@@ -300,6 +300,5 @@
300300

301301
rst_epilog = """
302302
.. _PSR-7: http://www.php-fig.org/psr/psr-7
303-
.. _`client implementation`:
304303
.. _Composer: https://getcomposer.org
305304
"""

development/code-of-conduct.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This Code of Conduct applies both within project spaces and in public spaces
3636
when an individual is representing the project or its community.
3737

3838
Instances of abusive, harassing, or otherwise unacceptable behavior may be
39-
reported by contacting a project maintainer at [[email protected]](mailto:[email protected]). All
39+
reported by contacting a project maintainer at [email protected]. All
4040
complaints will be reviewed and investigated and will result in a response that
4141
is deemed necessary and appropriate to the circumstances. Maintainers are
4242
obligated to maintain confidentiality with regard to the reporter of an

development/contributing.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Security issues
1818
---------------
1919

2020
If you discover any security related issues,
21-
please contact us at [[email protected]](mailto:[email protected]) instead of submitting an issue on GitHub.
21+
please contact us at [email protected] instead of submitting an issue on GitHub.
2222
This allows us to fix the issue and release a security hotfix without publicly disclosing the vulnerability.
2323

2424

@@ -49,7 +49,7 @@ Then install the dependencies through Composer_:
4949
$ composer install
5050
5151
Write code and tests. When you are ready, run the tests.
52-
(This is usually [PHPUnit](http://phpunit.de/) or [PHPSpec](http://phpspec.net/))
52+
(This is usually PHPUnit_ or PHPSpec_)
5353

5454
.. code-block:: bash
5555
@@ -112,6 +112,8 @@ License
112112

113113
All of our packages are licensed under the :doc:`MIT license <license>`.
114114

115+
.. _PHPUnit: http://phpunit.de/
116+
.. _PHPSpec: http://phpspec.net/
115117
.. _guidelines: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
116118
.. _create a pull request: https://help.github.com/articles/creating-a-pull-request/
117119
.. _semver: http://semver.org

docs/css/extra.css

-6
This file was deleted.

docs/promise.md

-5
This file was deleted.

docs/favicon.ico favicon.ico

File renamed without changes.

httplug.rst

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
HTTPlug: HTTP client abstraction
2+
================================
3+
4+
HTTPlug is an abstraction for HTTP clients. There are two main use cases:
5+
6+
1. Usage in a project/application
7+
2. Usage in a reusable package
8+
9+
In both cases, the ``Http\Client\HttpClient`` provides a ``sendRequest`` method
10+
to send a PSR-7 ``RequestInterface`` and returns a PSR-7 ``ResponseInterface``
11+
or throws an exception that implements ``Http\Client\Exception``.
12+
13+
There is also the ``Http\Client\HttpAsyncClient`` which provides the
14+
``sendAsyncRequest`` method to send a request asynchronously and returns a
15+
``Http\Client\Promise``.
16+
17+
The promise allows to specify handlers for a PSR-7 ``ResponseInterface``
18+
or an exception that implements ``Http\Client\Exception``.
19+
20+
.. warning::
21+
22+
Contract for the ``Http\Promise\Promise`` is temporary until `PSR is released`_.
23+
Once it is out, we will use this PSR in the main client and deprecate the old contract.
24+
25+
See the :doc:``tutorial`` for a concrete example.
26+
27+
28+
.. toctree::
29+
30+
Introduction <httplug/introduction>
31+
Tutorial <httplug/tutorial>
32+
Migrating <httplug/migrating>
33+
Virtual Package <httplug/virtual-package>
34+
35+
.. _`PSR is released`: https://groups.google.com/forum/?fromgroups#!topic/php-fig/wzQWpLvNSjs

httplug/introduction.rst

+4-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
HTTPlug: HTTP client abstraction
2-
================================
3-
4-
HTTPlug is an abstraction for HTTP clients. There are two main use cases:
5-
6-
1. Usage in a project/application
7-
2. Usage in a reusable package
8-
9-
In both cases, the ``Http\Client\HttpClient`` provides a ``sendRequest`` method
10-
to send a PSR-7 ``RequestInterface`` and returns a PSR-7 ``ResponseInterface``
11-
or throws an exception that implements ``Http\Client\Exception``.
12-
13-
There is also the ``Http\Client\HttpAsyncClient` which provides the
14-
``sendAsyncRequest`` method to send a request asynchronously and returns a
15-
``Http\Client\Promise``.
16-
17-
The promise allows to specify handlers for a PSR-7 ``ResponseInterface``
18-
or an exception that implements ``Http\Client\Exception``.
19-
20-
.. warning::
21-
22-
Contract for the ``Http\Promise\Promise`` is temporary until `PSR is released`_.
23-
Once it is out, we will use this PSR in the main client and deprecate the old contract.
24-
25-
See the :doc:``tutorial`` for a concrete example.
1+
Introduction to HTTPlug
2+
=======================
263

274
HTTPlug implementations
285
-----------------------
@@ -49,8 +26,7 @@ Check links above for the full list of implementations.
4926
Usage in an application
5027
-----------------------
5128

52-
When writing an application, you need to require a concrete
53-
[implementation](https://packagist.org/providers/php-http/client-implementation).
29+
When writing an application, you need to require a concrete implementation_.
5430

5531
See :doc:`virtual-package` for more information on the topic of working with HTTPlug implementations.
5632

@@ -113,7 +89,7 @@ In 2015, a decision has been made to move the library to its own organization, s
11389

11490
See :doc:`migrating` for a guide how to migrate your code from the Ivory adapter to HTTPlug.
11591

116-
.. _`PSR is released`: https://groups.google.com/forum/?fromgroups#!topic/php-fig/wzQWpLvNSjs
92+
.. _implementation: https://packagist.org/providers/php-http/client-implementation
11793
.. _HttplugBundle: https://github.com/php-http/HttplugBundle
11894
.. _`Eric Geloen`: https://github.com/egeloen
11995
.. _`Ivory Http Adapter`: https://github.com/egeloen/ivory-http-adapter).

index.rst

+3-7
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,14 @@ for discussion around a future HTTP client PSR.
5959

6060
.. toctree::
6161
:hidden:
62-
:maxdepth: 2
62+
:maxdepth: 3
6363

6464
PHP-HTTP <self>
6565

6666
.. toctree::
6767
:hidden:
68-
:caption: HTTPlug
6968

70-
Introduction <httplug/introduction>
71-
Tutorial <httplug/tutorial>
72-
Migrating <httplug/migrating>
73-
Virtual package <httplug/virtual-package>
69+
HTTPlug <httplug>
7470

7571
.. toctree::
7672
:hidden:
@@ -90,6 +86,6 @@ for discussion around a future HTTP client PSR.
9086

9187
.. toctree::
9288
:hidden:
93-
:caption: Development
89+
:caption: ---------
9490

9591
development/index.rst

message/authentication.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ WSSE
8484
$authentication = new Wsse('username', 'password');
8585
8686
Query Params
87-
*************
87+
************
8888

8989
``http://api.example.com/endpoint?access_token=9zh987g86fg87gh978hg9g79``::
9090

@@ -163,7 +163,9 @@ Implementing an authentication method is easy: only one method needs to be imple
163163
{
164164
// do something with the request
165165

166-
// keep in mind that the request is immutable - return the updated version of the request with the authentication information added to it.
166+
// keep in mind that the request is immutable - return the updated
167+
// version of the request with the authentication information added
168+
// to it.
167169
return $request;
168170
}
169171
}

mkdocs.yml

-53
This file was deleted.

0 commit comments

Comments
 (0)