PluginProbe
Hostinger Tools / 2.1.1
Hostinger Tools v2.1.1
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
← All changes | includes/requests/class-hostinger-requests-client.php +7 -3 2.0.12.1.1 View file →
@@ -17,9 +17,9 @@
17 17 $url = $this->api_url . $endpoint;
18 18 $request_args = array(
19 19 'method' => 'GET',
20 20 'headers' => array_merge( $this->default_headers, $headers ),
21 - 'timeout' => $timeout
21 + 'timeout' => $timeout,
22 22 );
23 23
24 24 if ( ! empty( $params ) ) {
25 25 $url = add_query_arg( $params, $url );
@@ -24,9 +24,11 @@
24 24 if ( ! empty( $params ) ) {
25 25 $url = add_query_arg( $params, $url );
26 26 }
27 27
28 - return wp_remote_get( $url, $request_args );
28 + $response = wp_remote_get( $url, $request_args );
29 +
30 + return $response;
29 31 }
30 32
31 33 public function post( $endpoint, $params = array(), $headers = array(), $timeout = 120 ) {
32 34 $url = $this->api_url . $endpoint;
@@ -36,7 +38,9 @@
36 38 'headers' => array_merge( $this->default_headers, $headers ),
37 39 'body' => $params,
38 40 );
39 41
40 - return wp_remote_post( $url, $request_args );
42 + $response = wp_remote_post( $url, $request_args );
43 +
44 + return $response;
41 45 }
42 46 }