Skip to content

Commit

Permalink
[skip ci] More details in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed May 22, 2017
1 parent baf7089 commit 958b707
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ $youtrack = new \Cog\YouTrack\Rest\YouTrackClient($httpClient, $authorizer);

### API requests

#### HTTP request

```php
$method = 'GET'; // POST, PUT, DELETE, PATCH or any custom ones
$response = $youtrack->request($method, '/issue/TEST-1');
```

#### HTTP GET request

```php
Expand Down Expand Up @@ -183,13 +190,17 @@ $psrResponse = $youtrackResponse->httpResponse();

#### Get response Cookie

Returns `Set-Cookie` headers as string from the HTTP response.

```php
$apiResponse = $youtrack->get('/issue/TEST-1');
$cookieString = $apiResponse->cookie();
```

#### Get response Location

Returns `Location` header from the HTTP response.

```php
$apiResponse = $youtrack->get('/issue/TEST-1');
$location = $apiResponse->location();
Expand Down

0 comments on commit 958b707

Please sign in to comment.