Esempio n. 1
0
 /**
  * @param $uri
  * @param array $getParams
  * @param array $postParams
  * @return Response
  */
 public static function sendGet($uri, array $getParams = [], array $postParams = [])
 {
     $requestHelper = new RequestHelper();
     $guzzle = new Client();
     $httpClient = new HTTPClient($guzzle, $requestHelper);
     $httpHelper = new HttpHelper($httpClient);
     $response = $httpHelper->sendGet($uri, $getParams, $postParams);
     return $response;
 }
Esempio n. 2
0
 private function checkRepoGithubExist()
 {
     $httphelper = new HttpHelper(new HTTPClient(new Client(), new RequestHelper()));
     $response = $httphelper->sendGet("https://api.github.com/repos/" . $this->workbenchSettings->requested["organization"]["valore"] . "/" . $this->workbenchSettings->requested["packagename"]["valore"]);
     return $response->status_code == 200 ? true : false;
 }