Ejemplo n.º 1
0
 /**
  * @param RegistryDeviceImporterRequest $request
  * @return \Psr\Http\Message\StreamInterface
  * @throws AeroGearPushException
  * @throws Exception\AeroGearAuthErrorException
  * @throws Exception\AeroGearBadRequestException
  * @throws Exception\AeroGearNotFoundException
  */
 public function registryDeviceImporter(RegistryDeviceImporterRequest $request)
 {
     // API endpoint requires tokens to be a multipart form upload
     $data = ['file' => $request->data['tokens']];
     $auth = $request->auth;
     $response = $this->curlClient->call($request->method, $this->serverUrl, $request->endpoint, $auth, $data, ['verifySSL' => false]);
     return $response;
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \GuzzleHttp\Exception\RequestException
  * @throws \Napp\AeroGearPush\Exception\AeroGearAuthErrorException
  * @throws \Napp\AeroGearPush\Exception\AeroGearBadRequestException
  * @throws \Napp\AeroGearPush\Exception\AeroGearNotFoundException
  * @throws \Napp\AeroGearPush\Exception\AeroGearPushException
  */
 public function testCurlClientException()
 {
     $client = new CurlClient();
     $client->call('', '', '', [], []);
 }