From 2882ccdb3c722c3ef556444216fe1e10c88d8269 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Tue, 29 Sep 2015 19:18:40 +0200 Subject: [PATCH] document options argument --- src/HttpMethodsClient.php | 8 ++++++++ src/HttpPsrClient.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/HttpMethodsClient.php b/src/HttpMethodsClient.php index 9b6bec2..8e0cb0c 100644 --- a/src/HttpMethodsClient.php +++ b/src/HttpMethodsClient.php @@ -11,6 +11,14 @@ * * Use this interface when you do not have PSR-7 RequestInterface instances available. * + * Implementations should be configured in their constructor. For runtime behaviour changes, there + * is an $options parameter. It SHOULD be validated by the client and an exception thrown if + * unknown options are passed. + * Option that must be accepted by every client implementation (though it is free to ignore them + * if the underlying implementation does not support the option): + * + * - timeout (int): the timeout for the HTTP request in seconds. 0 means to use the default. + * * @author Márk Sági-Kazár mark.sagikazar@gmail.com> */ interface HttpMethodsClient diff --git a/src/HttpPsrClient.php b/src/HttpPsrClient.php index 5215fa2..dadece4 100644 --- a/src/HttpPsrClient.php +++ b/src/HttpPsrClient.php @@ -9,6 +9,14 @@ /** * Sends one or more PSR-7 Request * + * Implementations should be configured in their constructor. For runtime behaviour changes, there + * is an $options parameter. It SHOULD be validated by the client and an exception thrown if + * unknown options are passed. + * Option that must be accepted by every client implementation (though it is free to ignore them + * if the underlying implementation does not support the option): + * + * - timeout (int): the timeout for the HTTP request in seconds. 0 means to use the default. + * * @author GeLo */ interface HttpPsrClient