KnpLabs/php-github-api — pull request #33 by andygrunwald (2013-03-02 09:06:53+00:00)
Title: [BUGFIX] Empty JSON-Content will be added to request

If you create an POST-Request (e.g. with an forking action) the HTTPClient will be created with a post content "[]".
This can create some problems on requesting path.

At the moment, if you fork a repository with the following code you will get an exception (500 internal server error on github).
```php
$client = new Github\Client();
$client->getHttpClient();
$client->authenticate('User', 'Password', Github\Client::AUTH_HTTP_PASSWORD);
$client->api('repository')->forks()->create('Github-User-To-Fork', 'Github-User-To-Fork');
```

This is, because the content is set to "[]".
This seems to be a bug at github side. I`ve reported this bug to github api team.
But anyway. To create clean requests, it would be great to set the content to empty, if it is empty.

Solution: Check if the content is empty.