芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/twilio/sdk/src/Twilio/Http/GuzzleClient.php
client = $client; } public function request(string $method, string $url, array $params = [], array $data = [], array $headers = [], string $user = null, string $password = null, int $timeout = null): Response { try { $body = Query::build($data, PHP_QUERY_RFC1738); $options = [ 'timeout' => $timeout, 'auth' => [$user, $password], 'body' => $body, ]; if ($params) { $options['query'] = $params; } $response = $this->client->send(new Request($method, $url, $headers), $options); } catch (BadResponseException $exception) { $response = $exception->getResponse(); } catch (\Exception $exception) { throw new HttpException('Unable to complete the HTTP request', 0, $exception); } // Casting the body (stream) to a string performs a rewind, ensuring we return the entire response. // See https://stackoverflow.com/a/30549372/86696 return new Response($response->getStatusCode(), (string)$response->getBody(), $response->getHeaders()); } }