Skip to content
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

Merged
merged 7 commits into from
Sep 16, 2015
Merged

Basic REST client implementation with unit tests #1

merged 7 commits into from
Sep 16, 2015

Conversation

juvenn
Copy link
Member

@juvenn juvenn commented Sep 15, 2015

基于 php-curl 的最基本的REST client,实现基本的 request, get, post, put, delete 接口。

private static function getRequestHeaders($headers, $useMasterKey) {
$h = self::$default_headers;

$h['X-AVOSCloud-Application-Production'] = self::$useProduction ? 1 : 0;
Copy link

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已与 LeanEngine 确定,SDK 中只需要支持短 header。在下一个 PR 调整。

juvenn added a commit that referenced this pull request Sep 16, 2015
Basic REST client implementation with unit tests
@juvenn juvenn merged commit d067da7 into leancloud:master Sep 16, 2015
self::$appMasterKey = $appMasterKey;

self::$default_headers = array(
'X-AVOSCloud-Application-Id' => self::$appId,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用短 Header ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants