Skip to content

Commit cd04192

Browse files
authored
Moved documentation (#6)
1 parent d8c6e00 commit cd04192

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,9 @@ Via Composer
1515
$ composer require php-http/multipart-stream-builder
1616
```
1717

18-
## Usage
19-
20-
```php
21-
$builder = new MultipartStreamBuilder();
22-
$builder
23-
->addResource('foo', $stream)
24-
->addResource('bar', fopen($filePath, 'r'), ['filename' => 'bar.png'])
25-
->addResource('baz', 'string', ['headers' => ['Content-Type' => 'text/plain']]);
26-
27-
$multipartStream = $builder->build();
28-
$boundary = $builder->getBoundary();
29-
30-
$request = MessageFactoryDiscovery::find()->createRequest(
31-
'POST',
32-
'http://example.com',
33-
['Content-Type' => 'multipart/form-data; boundary='.$boundary],
34-
$multipartStream
35-
);
36-
$response = HttpClientDiscovery::find()->sendRequest($request);
37-
```
38-
3918
## Documentation
4019

41-
Please see the [official documentation](http://php-http.readthedocs.org/en/latest/multipart-stream-builder/).
20+
Please see the [official documentation](http://php-http.readthedocs.org/en/latest/components/multipart-stream-builder.html).
4221

4322

4423
## Contributing

0 commit comments

Comments
 (0)