Skip to content

Commit 5764a49

Browse files
committed
Add complete TOC and stubs
1 parent 67788fb commit 5764a49

26 files changed

+93
-15
lines changed

docs/clients/curl-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# CURL Client

docs/clients/guzzle5-adapter.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Guzzle5 Adapter

docs/clients/guzzle6-adapter.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Guzzle6 Adapter

docs/clients/mock-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Mock Client

docs/clients/react-adapter.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# React Adapter

docs/clients/socket-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Socket Client
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Adapter Integration Tests
2+
3+
TODO

docs/components/client-common.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Client Common
2+
3+
TODO

docs/components/authentication.md renamed to docs/components/message.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
# Authentication
1+
# Message
2+
3+
This package contains various PSR-7 tools which might be useful in an HTTP workflow:
4+
5+
* Authentication method implementations
6+
* Various Stream encoding tools
7+
* Message decorators
8+
* Message factory implementations for Guzzle PSR-7 and Diactoros
9+
* Cookie implementation
10+
11+
## Authentication
212

313
The Authentication component allows you to to implement authentication methods which can simply update the request
414
with authentication detail (for example by adding an `Authorization` header).
515
This is useful when you have to send multiple requests to the same endpoint. Using an authentication implementation,
616
these details can be separated from the actual requests.
717

818

9-
## Installation
19+
### Installation
1020

1121
```
1222
$ composer require php-http/message
1323
```
1424

1525

16-
## Authentication methods
26+
### Authentication methods
1727

1828
Method | Parameters | Behavior
1929
---------------- | ------------------------------------------------- | --------
@@ -28,15 +38,15 @@ Matching | An authentication instance and a matcher callback | Behavior
2838
[2]: http://www.xml.com/pub/a/2003/12/17/dive.html
2939

3040

31-
## Integration with HTTPlug
41+
### Integration with HTTPlug
3242

3343
Normally requests must be authenticated "by hand" which is not really convenient.
3444

3545
If you use HTTPlug, you can integrate this component into the client using the
3646
[authentication plugin](/httplug/plugins/authentication).
3747

3848

39-
## Examples
49+
### Examples
4050

4151
General usage looks like the following:
4252

@@ -48,7 +58,7 @@ $authentication->authenticate($request);
4858
```
4959

5060

51-
### Basic Auth
61+
#### Basic Auth
5262

5363
``` php
5464
use Http\Message\Authentication\BasicAuth;
@@ -57,7 +67,7 @@ $authentication = new BasicAuth('username', 'password');
5767
```
5868

5969

60-
### Bearer
70+
#### Bearer
6171

6272
``` php
6373
use Http\Message\Authentication\Bearer;
@@ -66,7 +76,7 @@ $authentication = new Bearer('token');
6676
```
6777

6878

69-
### WSSE
79+
#### WSSE
7080

7181
``` php
7282
use Http\Message\Authentication\Wsse;
@@ -75,7 +85,7 @@ $authentication = new Wsse('username', 'password');
7585
```
7686

7787

78-
### Query Params
88+
#### Query Params
7989

8090
`http://api.example.com/endpoint?access_token=9zh987g86fg87gh978hg9g79`
8191

@@ -94,7 +104,7 @@ $authentication = new QueryParams([
94104

95105

96106

97-
### Chain
107+
#### Chain
98108

99109
The idea behind this authentication method is that in some cases you might need to
100110
authenticate the request with multiple methods.
@@ -115,7 +125,7 @@ $authentication = new Chain($authenticationChain);
115125
```
116126

117127

118-
### Matching
128+
#### Matching
119129

120130
With this authentication method you can conditionally add authentication details to your request by passing a callable
121131
to it. When a request is passed, the callable is called and used as a boolean value in order to decide whether
@@ -152,7 +162,7 @@ $authentication = Matching::createUrlMatcher(new AuthenticationMethod(), '\/api'
152162
```
153163

154164

155-
## Implement your own
165+
### Implement your own
156166

157167
Implementing an authentication method is easy: only one method needs to be implemented.
158168

docs/components/promise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Promise
2+
3+
Promise used for asynchronous HTTP requests.
4+
5+
This will eventually be removed/deprecated and replaced with the upcoming Promise PSR.

docs/httplug/plugins/encoding.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/plugins/cache.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cache Plugin
2+
3+
TODO

docs/plugins/content-length.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Content-Length Plugin
2+
3+
TODO
File renamed without changes.

docs/plugins/decoder.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Decoder Plugin
2+
3+
TODO
File renamed without changes.

docs/plugins/history.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# History Plugin
2+
3+
TODO: explain the error plugin
File renamed without changes.

docs/plugins/journal.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Journal
2+
3+
TODO

docs/plugins/logger.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Logger Plugin
2+
3+
TODO
File renamed without changes.
File renamed without changes.
File renamed without changes.

mkdocs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,39 @@ markdown_extensions:
99
permalink: true
1010
- sane_lists
1111
- admonition
12+
13+
pages:
14+
- Home: index.md
15+
- HTTPlug:
16+
- httplug/index.md
17+
- httplug/migrating.md
18+
- httplug/tutorial.md
19+
- httplug/utils.md
20+
- httplug/virtual-package.md
21+
- 'Clients & Adapters':
22+
- clients/curl-client.md
23+
- clients/mock-client.md
24+
- clients/socket-client.md
25+
- clients/guzzle5-adapter.md
26+
- clients/guzzle6-adapter.md
27+
- clients/react-adapter.md
28+
- Plugins:
29+
- plugins/index.md
30+
- plugins/authentication.md
31+
- plugins/cache.md
32+
- plugins/content-length.md
33+
- plugins/cookie.md
34+
- plugins/decoder.md
35+
- plugins/error.md
36+
- plugins/history.md
37+
- plugins/journal.md
38+
- plugins/logger.md
39+
- plugins/redirect.md
40+
- plugins/retry.md
41+
- plugins/stopwatch.md
42+
- Other Components: components/
43+
# - components/discovery.md
44+
# - components/message.md
45+
# - components/message-factory.md
46+
# - components/promise.md
47+

0 commit comments

Comments
 (0)