You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Required credentials are a *Certificate Authority Certificate*, a *Client Certificate* and the password that is used to decrypt the Client Certificate that get provided to the class constructor as arguments.
290
290
291
291
```{php}
292
-
use Markenwerk\BasicHttpClient\Request\Authentication\ClientCertificateAuthentication;
293
-
use Markenwerk\BasicHttpClient\Request\Request;
292
+
use ChromaX\BasicHttpClient\Request\Authentication\ClientCertificateAuthentication;
293
+
use ChromaX\BasicHttpClient\Request\Request;
294
294
295
295
// Configuring the authentication
296
296
$clientCertificateAuthentication = new ClientCertificateAuthentication(
If using the `BasicHttpClient` the response object is returned by the termination methods listed above. If directly using the Request instance, you can get the Response object via a getter.
314
314
315
315
```{php}
316
-
// Getting the response Markenwerk\BasicHttpClient\Response\Response object
316
+
// Getting the response ChromaX\BasicHttpClient\Response\Response object
317
317
$response = $request->getResponse();
318
318
319
319
// Reading the HTTP status code as integer; will return `200`
Every part of the client is based upon proper interfaces. Most class instances can get injected into the client itself.
391
391
If you want to extend the client just write some classes implementing the according interface and you´re done with that.
392
392
393
-
Take a look at the [PHP JSON HTTP Client](https://github.com/markenwerk/php-json-http-client) which is an extension of the PHP Basic HTTP Client.
393
+
Take a look at the [PHP JSON HTTP Client](https://github.com/chroma-x/php-json-http-client) which is an extension of the PHP Basic HTTP Client.
394
394
395
395
---
396
396
397
397
## Exception handling
398
398
399
399
PHP Basic HTTP Client provides different exceptions – also provided by the PHP Common Exceptions project – for proper handling.
400
-
You can find more information about [PHP Common Exceptions at Github](https://github.com/markenwerk/php-common-exceptions).
400
+
You can find more information about [PHP Common Exceptions at Github](https://github.com/chroma-x/php-common-exceptions).
401
401
402
402
### Exceptions to be expected
403
403
404
404
In general you should expect that any setter method could thrown an `\InvalidArgumentException`. The following exceptions could get thrown while using PHP Basic HTTP Client.
405
405
406
-
-`Markenwerk\CommonException\IoException\FileNotFoundException` on configuring a `ClientCertificateAuthentication`instance
407
-
-`Markenwerk\CommonException\IoException\FileReadableException` on configuring a `ClientCertificateAuthentication`instance
408
-
-`Markenwerk\BasicHttpClient\Exception\HttpRequestAuthenticationException` on performing a request
409
-
-`Markenwerk\BasicHttpClient\Exception\HttpRequestException` on performing a request
410
-
-`Markenwerk\CommonException\NetworkException\ConnectionTimeoutException` on performing a request
411
-
-`Markenwerk\CommonException\NetworkException\CurlException` on performing a request
406
+
-`ChromaX\CommonException\IoException\FileNotFoundException` on configuring a `ClientCertificateAuthentication`instance
407
+
-`ChromaX\CommonException\IoException\FileReadableException` on configuring a `ClientCertificateAuthentication`instance
408
+
-`ChromaX\BasicHttpClient\Exception\HttpRequestAuthenticationException` on performing a request
409
+
-`ChromaX\BasicHttpClient\Exception\HttpRequestException` on performing a request
410
+
-`ChromaX\CommonException\NetworkException\ConnectionTimeoutException` on performing a request
411
+
-`ChromaX\CommonException\NetworkException\CurlException` on performing a request
412
412
413
413
---
414
414
415
415
## Contribution
416
416
417
417
Contributing to our projects is always very appreciated.
418
-
**But: please follow the contribution guidelines written down in the [CONTRIBUTING.md](https://github.com/markenwerk/php-basic-http-client/blob/master/CONTRIBUTING.md) document.**
418
+
**But: please follow the contribution guidelines written down in the [CONTRIBUTING.md](https://github.com/chroma-x/php-basic-http-client/blob/master/CONTRIBUTING.md) document.**
0 commit comments