-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic REST client implementation with unit tests #1
Conversation
private static function getRequestHeaders($headers, $useMasterKey) { | ||
$h = self::$default_headers; | ||
|
||
$h['X-AVOSCloud-Application-Production'] = self::$useProduction ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在 LeanEngine / 后端存储都支持短 header 了,推荐只使用短 header,不考虑之前的兼容性了。(如果要实现 php LeanEngine SDK 的话需要兼容)
下面 header 相关的地方也需要修改。
相关 issue: https://github.com/leancloud/uluru-platform/issues/1335
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已与 LeanEngine 确定,SDK 中只需要支持短 header。在下一个 PR 调整。
Basic REST client implementation with unit tests
self::$appMasterKey = $appMasterKey; | ||
|
||
self::$default_headers = array( | ||
'X-AVOSCloud-Application-Id' => self::$appId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用短 Header ?
基于 php-curl 的最基本的REST client,实现基本的 request, get, post, put, delete 接口。