Guest User

Untitled

a guest
Oct 18th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2. require 'vendor/autoload.php';
  3.  
  4. $domainName = 'hq.kaiten.local:3000';
  5. $username = 'admin';
  6. $password = 'kkkaiten';
  7.  
  8. $client = new \GuzzleHttp\Client();
  9. // $res = $client->request('GET', "http://{$domainName}/api/v1/spaces", [
  10. //     'auth' => [$username, $password]
  11. // ]);
  12.  
  13.  
  14. $res = $client->request('POST', "http://{$domainName}/api/v1/cards/11/users", [
  15.     'json' => ['user_id' => 1],
  16.     'auth' => [$username, $password]
  17. ]);
  18.  
  19. echo $res->getStatusCode();
  20. echo $res->getBody();
Add Comment
Please, Sign In to add comment