芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/vendor/square/square/src/Apis/SitesApi.php
config->getBaseUri() . $_queryBuilder); //prepare headers $_headers = [ 'user-agent' => BaseApi::USER_AGENT, 'Accept' => 'application/json', 'Square-Version' => $this->config->getSquareVersion() ]; $_headers = ApiHelper::mergeHeaders($_headers, $this->config->getAdditionalHeaders()); $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); // Apply authorization to request $this->getAuthManager('global')->apply($_httpRequest); //call on-before Http callback if ($this->getHttpCallBack() != null) { $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); } // and invoke the API call request to fetch the response try { $response = Request::get($_httpRequest->getQueryUrl(), $_httpRequest->getHeaders()); } catch (\Unirest\Exception $ex) { throw new ApiException($ex->getMessage(), $_httpRequest); } $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); $_httpContext = new HttpContext($_httpRequest, $_httpResponse); //call on-after Http callback if ($this->getHttpCallBack() != null) { $this->getHttpCallBack()->callOnAfterRequest($_httpContext); } if (!$this->isValidResponse($_httpResponse)) { return ApiResponse::createFromContext($response->body, null, $_httpContext); } $mapper = $this->getJsonMapper(); $deserializedResponse = $mapper->mapClass($response->body, 'Square\\Models\\ListSitesResponse'); return ApiResponse::createFromContext($response->body, $deserializedResponse, $_httpContext); } }