13 Commits

Author SHA1 Message Date
baee44c97b OAuth API Response with 20x status should be in normal
Hello,

I used **Yii2 authclient** to build a Github OAuth (2.0) client, and performed a POST call to create a Github repository hook. But I got this exception:

```
exception 'yii\authclient\InvalidResponseException' with message '
Request failed with code: 201, message:
{
	"url": "https://api.github.com/repos/ychongsaytc/example/hooks/1000000",
	"test_url": "https://api.github.com/repos/ychongsaytc/example/hooks/1000000/test",
	"id": 1000000,
	"name": "web",
	"active": true,
	"events": ["push"],
	"config": {
		"url": "https://example.com/payload",
		"content_type": "form",
		"secret": null
	},
	"last_response": {
		"code": null,
		"status": "unused",
		"message": null
	},
	"updated_at": "2014-09-14T03:02:55Z",
	"created_at": "2014-09-14T03:02:55Z"
}
' in /home/ubuntu/public_html/live/vendor/yiisoft/yii2-authclient/BaseOAuth.php:206
```

I think a successful API call is not always exactly return **200** status, like **Create a hook** API of Github: https://developer.github.com/v3/repos/hooks/

It will return `201 Created` if hook was successfully created.

In my opinion, is status code starts with **20** in normal scenario?

close #5011
2014-09-14 12:59:11 +02:00
7736853837 property code style extensions 2014-07-30 00:40:46 +02:00
9757029191 yii\authclient\InvalidResponseException added 2014-07-11 14:38:20 +03:00
a1a9d9a3bc Method yii\authclient\BaseOAuth::mergeCurlOptions() advanced to merge array values 2014-07-11 12:30:30 +03:00
fbce722d85 Request HTTP headers argument added to yii\authclient\BaseOAuth::api() method 2014-07-11 12:27:33 +03:00
d75f0c7288 removed @link tags from apidoc and replaced with markdown 2014-05-25 22:29:31 +02:00
c27ac8ef0e updated phpdoc 2014-04-26 03:39:46 +02:00
fe14f0c5e3 fixed all the PHPdoc in extensions 2014-04-23 03:25:11 +02:00
14137a123e Correct classname typo
Correct classname to `BaseOAuth` instead of `BaseClient` in PHP Doc.
2014-03-26 16:26:52 +05:30
1e75427393 updated classmap and phpdoc 2014-03-24 23:26:30 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
7d33a5d3b5 Some Code style fixes 2014-01-19 13:35:36 -03:00
da9d544c54 psr-4 change. 2014-01-10 21:06:25 -05:00