dev-master
9999999-dev https://github.com/TeamOffshoot/httpA very similar library for working with HTTP requests
MIT
The Requires
- php >=5.3.0
- ext-curl *
- ext-json *
The Development Requires
api http
Wallogit.com
2017 © Pedro Peláez
A very similar library for working with HTTP requests
TBD, (*1)
If you're using a cURL based HttpClient like the CurlHttpClient, you will want
to include the cacert.pem file that can be found at
http://curl.haxx.se/docs/caextract.html, (*2)
You can add this as a dependency in your composer file. Your composer.json
might look something like this:, (*3)
{
"require": {
"offshoot/http": "0.1.x",
"haxx-se/curl": "1.0.0"
},
"repositories": [
{
"type": "package",
"package": {
"name": "haxx-se/curl",
"version": "1.0.0",
"dist": {
"url": "http://curl.haxx.se/ca/cacert.pem",
"type": "file"
}
}
}
]
}
You will be able to find the cacert.pem file in vendor/haxx-se/curl/cacert.pem, (*4)
$pathToCertificateFile = "vendor/haxx-se/curl/cacert.pem"; $httpClient = new \Offshoot\HttpClient\CurlHttpClient($pathToCertificateFile); $redirector = new \Offshoot\Redirector\HeaderRedirector();
Contributions are welcome. Just fork the repository and send a pull request. Please be sure to include test coverage with your pull request. You can learn more about Pull Requests here, (*5)
In order to run the test suite, ensure that the development dependencies have been installed via composer. Then from your command line, simple run:, (*6)
vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/
This library is released under the MIT License, (*7)
A very similar library for working with HTTP requests
MIT
api http