Download the PHP package werkint/reactphp-http-client without Composer
On this page you can find all versions of the php package werkint/reactphp-http-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package reactphp-http-client
HttpClient Component
Basic HTTP/1.0 client.
Basic usage
Requests are prepared using the Client#request()
method. Body can be
sent with Request#write()
. Request#end()
finishes sending the request
(or sends it at all if no body was written).
Request implements WritableStreamInterface, so a Stream can be piped to it. Response implements ReadableStreamInterface.
Interesting events emitted by Request:
response
: The response headers were received from the server and successfully parsed. The first argument is a Response instance.error
: An error occurred.end
: The request is finished. If an error occurred, it is passed as first argument. Second and third arguments are the Response and the Request.
Interesting events emitted by Response:
data
: Passes a chunk of the response body as first argument and a Response object itself as second argument. When a response encounters a chunked encoded response it will parse it transparently for the user ofResponse
and removing theTransfer-Encoding
header.error
: An error occurred.end
: The response has been fully received. If an error occurred, it is passed as first argument.
Example
See also the examples.
TODO
- gzip content encoding
- keep-alive connections
- following redirections
All versions of reactphp-http-client with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
guzzlehttp/psr7 Version ^1.0
react/socket-client Version ^0.5 || ^0.4 || ^0.3
react/dns Version 0.4.*
react/event-loop Version 0.4.*
react/stream Version 0.4.*
react/promise Version ~2.2
evenement/evenement Version ~2.0
guzzlehttp/psr7 Version ^1.0
react/socket-client Version ^0.5 || ^0.4 || ^0.3
react/dns Version 0.4.*
react/event-loop Version 0.4.*
react/stream Version 0.4.*
react/promise Version ~2.2
evenement/evenement Version ~2.0
The package werkint/reactphp-http-client contains the following files
Loading the files please wait ....