aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2024-10-10 07:54:46 +0200
committerThomas Citharel <tcit@tcit.fr>2024-10-11 10:57:02 +0200
commitdcd27fd986427a8ccfbf0a9d01568cf7918b7659 (patch)
tree6bd4336bc64e0071f3ced2a147677c9a6f28c503 /lib/public
parentd013a13eb5b546f2f02ea64a6d64e22eac79cd18 (diff)
downloadnextcloud-server-dcd27fd986427a8ccfbf0a9d01568cf7918b7659.tar.gz
nextcloud-server-dcd27fd986427a8ccfbf0a9d01568cf7918b7659.zip
feat(http-client): expose default request timeout constant to be used instead of magic number 30add-default-request-timeout-const
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 <tcit@tcit.fr>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Http/Client/IClient.php8
1 files changed, 8 insertions, 0 deletions
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