芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/vendor/omnipay/common/src/Common/Http/Client.php
httpClient = $httpClient ?: HttpClientDiscovery::find(); $this->requestFactory = $requestFactory ?: MessageFactoryDiscovery::find(); } /** * @param $method * @param $uri * @param array $headers * @param string|array|resource|StreamInterface|null $body * @param string $protocolVersion * @return ResponseInterface * @throws \Http\Client\Exception */ public function request( $method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1' ) { $request = $this->requestFactory->createRequest($method, $uri, $headers, $body, $protocolVersion); return $this->sendRequest($request); } /** * @param RequestInterface $request * @return ResponseInterface * @throws \Http\Client\Exception */ private function sendRequest(RequestInterface $request) { try { return $this->httpClient->sendRequest($request); } catch (\Http\Client\Exception\NetworkException $networkException) { throw new NetworkException($networkException->getMessage(), $request, $networkException); } catch (\Exception $exception) { throw new RequestException($exception->getMessage(), $request, $exception); } } }