Example #1
0
 public function testPutRoleResources()
 {
     $client = new \Zend\Http\Client(self::HOST . '/roles/1/resources/ZfeggAdmin\\V1\\Rest\\AdminRole\\Controller::collection');
     $client->setMethod('PUT');
     $client->setHeaders(['Accept' => 'application/hal+json', 'Content-Type' => 'application/json']);
     $client->setRawBody(json_encode(['resource' => 'ZfeggAdmin\\V1\\Rest\\AdminRole\\Controller::collection', 'privileges' => ['GET', 'post', 'Put', 'delete']]));
     $response = $client->send();
     echo Json::prettyPrint($response->getBody());
 }