Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
1a7b7432
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1a7b7432
编写于
3月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2121 format http sample code.
Merge pull request !2121 from clevercong/mysubmit
上级
b07fe4cd
c5855985
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
40 addition
and
40 deletion
+40
-40
zh-cn/application-dev/reference/apis/js-apis-contact.md
zh-cn/application-dev/reference/apis/js-apis-contact.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-http.md
zh-cn/application-dev/reference/apis/js-apis-http.md
+38
-38
zh-cn/application-dev/reference/apis/js-apis-sim.md
zh-cn/application-dev/reference/apis/js-apis-sim.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-contact.md
浏览文件 @
1a7b7432
...
...
@@ -776,7 +776,7 @@ queryContacts(attrs: ContactAttributes, callback: AsyncCallback<Array<Cont
## contact.queryContacts
queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback
<
Array
<
Contact
>>
)
queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback
<
Array
<
Contact
>>
)
: void
查询所有联系人,使用callback方式作为异步方法。
...
...
zh-cn/application-dev/reference/apis/js-apis-http.md
浏览文件 @
1a7b7432
...
...
@@ -143,14 +143,14 @@ httpRequest.request("EXAMPLE_URL",
},
readTimeout: 60000,
connectTimeout: 60000
},(err, data) => {
},
(err, data) => {
if (!err) {
console.info('Result:' + data.result);
console.info('code:' + data.responseCode);
console.info('header:' + data.header);
console.info('cookies:' + data.cookies); // 8+
console.info('header['Content-Type']
:' + data.header['Content-Type']);
console.info('header['Status-Line']
:' + data.header['Status-Line']);
console.info('header.Content-Type
:' + data.header['Content-Type']);
console.info('header.Status-Line
:' + data.header['Status-Line']);
console.info('header.Date:' + data.header.Date);
console.info('header.Server:' + data.header.Server);
} else {
...
...
@@ -200,8 +200,8 @@ promise.then((value) => {
console.info('code:' + value.responseCode);
console.info('header:' + value.header);
console.info('cookies:' + value.cookies); // 8+
console.info('header['Content-Type']
:' + value.header['Content-Type']);
console.info('header['Status-Line']
:' + value.header['Status-Line']);
console.info('header.Content-Type
:' + value.header['Content-Type']);
console.info('header.Status-Line
:' + value.header['Status-Line']);
console.info('header.Date:' + value.header.Date);
console.info('header.Server:' + value.header.Server);
}).catch((err) => {
...
...
zh-cn/application-dev/reference/apis/js-apis-sim.md
浏览文件 @
1a7b7432
...
...
@@ -140,7 +140,7 @@ sim.hasOperatorPrivileges(0, (err, data) => {
## sim.hasOperatorPrivileges<sup>7+</sup>
hasOperatorPrivileges(slotId: number): Promise
<boolean>
hasOperatorPrivileges(slotId: number): Promise<boolean
\
>
检查应用(调用者)是否已被授予运营商权限,使用Promise方式作为异步方法。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录