summaryrefslogtreecommitdiffstats
path: root/lib/private/http
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-08-22 14:36:01 +0200
committerLukas Reschke <lukas@owncloud.com>2015-08-22 14:39:43 +0200
commit0a1d551090696b6423cf4fe0740468bff912a972 (patch)
tree5efff5151f8bea86ec11d8d5db6d71c40d890cab /lib/private/http
parent510010e774c4019b7fc616c90085649abb7afac3 (diff)
downloadnextcloud-server-0a1d551090696b6423cf4fe0740468bff912a972.tar.gz
nextcloud-server-0a1d551090696b6423cf4fe0740468bff912a972.zip
Use IClientService to check for remote ownCloud instances
1. Allows to set a timeout (though still not perfect but way better than before) 2. Allows to have unit tests 3. I also added unit tests for the existing controller code 4. Corrected PHPDoc on IClient
Diffstat (limited to 'lib/private/http')
-rw-r--r--lib/private/http/client/client.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/http/client/client.php b/lib/private/http/client/client.php
index fb3e06f3c46..323fc0d324f 100644
--- a/lib/private/http/client/client.php
+++ b/lib/private/http/client/client.php
@@ -144,6 +144,7 @@ class Client implements IClient {
* 'debug' => true,
* 'timeout' => 5,
* @return Response
+ * @throws \Exception If the request could not get completed
*/
public function head($uri, $options = []) {
$response = $this->client->head($uri, $options);
@@ -176,6 +177,7 @@ class Client implements IClient {
* 'debug' => true,
* 'timeout' => 5,
* @return Response
+ * @throws \Exception If the request could not get completed
*/
public function post($uri, array $options = []) {
$response = $this->client->post($uri, $options);
@@ -208,6 +210,7 @@ class Client implements IClient {
* 'debug' => true,
* 'timeout' => 5,
* @return Response
+ * @throws \Exception If the request could not get completed
*/
public function put($uri, array $options = []) {
$response = $this->client->put($uri, $options);
@@ -240,6 +243,7 @@ class Client implements IClient {
* 'debug' => true,
* 'timeout' => 5,
* @return Response
+ * @throws \Exception If the request could not get completed
*/
public function delete($uri, array $options = []) {
$response = $this->client->delete($uri, $options);
@@ -273,6 +277,7 @@ class Client implements IClient {
* 'debug' => true,
* 'timeout' => 5,
* @return Response
+ * @throws \Exception If the request could not get completed
*/
public function options($uri, array $options = []) {
$response = $this->client->options($uri, $options);