From dcd27fd986427a8ccfbf0a9d01568cf7918b7659 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 10 Oct 2024 07:54:46 +0200 Subject: feat(http-client): expose default request timeout constant to be used instead of magic number 30 Will be used to set default where we are able to override the default timeout. See https://github.com/nextcloud/server/pull/48418 Signed-off-by: Thomas Citharel --- lib/public/Http/Client/IClient.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/public/Http/Client') diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php index ad4c018ab7b..e4f46d44e4d 100644 --- a/lib/public/Http/Client/IClient.php +++ b/lib/public/Http/Client/IClient.php @@ -14,6 +14,14 @@ namespace OCP\Http\Client; * @since 8.1.0 */ interface IClient { + + /** + * Default request timeout for requests + * + * @since 31.0.0 + */ + public const DEFAULT_REQUEST_TIMEOUT = 30; + /** * Sends a GET request * @param string $uri -- cgit v1.2.3