HarmonyOS 平臺(tái)中使用網(wǎng)絡(luò)請(qǐng)求,需要引入 "@ohos.net.http", 并且需要在 module.json5 文件中申請(qǐng)網(wǎng)絡(luò)權(quán)限, 即 “ohos.permission.INTERNET”
本篇文章將嘗試使用 @ohos.net.http 來(lái)實(shí)現(xiàn)網(wǎng)絡(luò)請(qǐng)求
場(chǎng)景設(shè)定
- WeiBo UniDemo HuaWei : 請(qǐng)求順序
- WeiBo1 UniDemo2 HuaWei3 : 異步/同步請(qǐng)求時(shí),序號(hào)表示請(qǐng)求回來(lái)的順序
- “開(kāi)始網(wǎng)絡(luò)請(qǐng)求-異步” : 開(kāi)始異步請(qǐng)求
- “開(kāi)始網(wǎng)絡(luò)請(qǐng)求-同步” : 開(kāi)始同步請(qǐng)求
- “開(kāi)始網(wǎng)絡(luò)請(qǐng)求-自定義方法裝飾器” : 采用自定義方法裝飾器進(jìn)行傳參,進(jìn)而完成網(wǎng)絡(luò)請(qǐng)求
官方網(wǎng)絡(luò)請(qǐng)求案例
注意:
每次請(qǐng)求都必須新創(chuàng)建一個(gè)HTTP請(qǐng)求實(shí)例,即只要發(fā)起請(qǐng)求,必須調(diào)用createHttp方法
更多鴻蒙開(kāi)發(fā)應(yīng)用知識(shí)已更新qr23.cn/AKFP8k
參考前往。
關(guān)于 @ohos.net.http 有三個(gè)request方法
可+mau123789獲取鴻蒙文檔
- request(url: string, callback: AsyncCallback): void;
1.1 如下“官方指南代碼縮減版”使用到了這個(gè)方法 - request(url: string, options: HttpRequestOptions, callback: AsyncCallback): void;
2.1 如下“官方指南代碼” 使用了這個(gè)方法 - request(url: string, options?: HttpRequestOptions): Promise;
3.1 將在后續(xù)實(shí)踐代碼中使用到
// 引入包名
import http from '@ohos.net.http';
// 每一個(gè)httpRequest對(duì)應(yīng)一個(gè)HTTP請(qǐng)求任務(wù),不可復(fù)用
let httpRequest = http.createHttp();
// 用于訂閱HTTP響應(yīng)頭,此接口會(huì)比request請(qǐng)求先返回??梢愿鶕?jù)業(yè)務(wù)需要訂閱此消息
// 從API 8開(kāi)始,使用on('headersReceive', Callback)替代on('headerReceive', AsyncCallback)。 8+
httpRequest.on('headersReceive', (header) = > {
console.info('header: ' + JSON.stringify(header));
});
httpRequest.request(
// 填寫(xiě)HTTP請(qǐng)求的URL地址,可以帶參數(shù)也可以不帶參數(shù)。URL地址需要開(kāi)發(fā)者自定義。請(qǐng)求的參數(shù)可以在extraData中指定
"EXAMPLE_URL",
{
method: http.RequestMethod.POST, // 可選,默認(rèn)為http.RequestMethod.GET
// 開(kāi)發(fā)者根據(jù)自身業(yè)務(wù)需要添加header字段
header: {
'Content-Type': 'application/json'
},
// 當(dāng)使用POST請(qǐng)求時(shí)此字段用于傳遞內(nèi)容
extraData: {
"data": "data to send",
},
expectDataType: http.HttpDataType.STRING, // 可選,指定返回?cái)?shù)據(jù)的類(lèi)型
usingCache: true, // 可選,默認(rèn)為true
priority: 1, // 可選,默認(rèn)為1
connectTimeout: 60000, // 可選,默認(rèn)為60000ms
readTimeout: 60000, // 可選,默認(rèn)為60000ms
usingProtocol: http.HttpProtocol.HTTP1_1, // 可選,協(xié)議類(lèi)型默認(rèn)值由系統(tǒng)自動(dòng)指定
}, (err, data) = > {
if (!err) {
// data.result為HTTP響應(yīng)內(nèi)容,可根據(jù)業(yè)務(wù)需要進(jìn)行解析
console.info('Result:' + JSON.stringify(data.result));
console.info('code:' + JSON.stringify(data.responseCode));
// data.header為HTTP響應(yīng)頭,可根據(jù)業(yè)務(wù)需要進(jìn)行解析
console.info('header:' + JSON.stringify(data.header));
console.info('cookies:' + JSON.stringify(data.cookies)); // 8+
} else {
console.info('error:' + JSON.stringify(err));
// 取消訂閱HTTP響應(yīng)頭事件
httpRequest.off('headersReceive');
// 當(dāng)該請(qǐng)求使用完畢時(shí),調(diào)用destroy方法主動(dòng)銷(xiāo)毀
httpRequest.destroy();
}
}
);
// 引入包名
import http from '@ohos.net.http';
// 每一個(gè)httpRequest對(duì)應(yīng)一個(gè)HTTP請(qǐng)求任務(wù),不可復(fù)用
let httpRequest = http.createHttp();
httpRequest.request(
// 填寫(xiě)HTTP請(qǐng)求的URL地址,可以帶參數(shù)也可以不帶參數(shù)。URL地址需要開(kāi)發(fā)者自定義。請(qǐng)求的參數(shù)可以在extraData中指定
"EXAMPLE_URL",
(err, data) = > {
if (!err) {
// data.result為HTTP響應(yīng)內(nèi)容,可根據(jù)業(yè)務(wù)需要進(jìn)行解析
console.info('Result:' + JSON.stringify(data.result));
console.info('code:' + JSON.stringify(data.responseCode));
// data.header為HTTP響應(yīng)頭,可根據(jù)業(yè)務(wù)需要進(jìn)行解析
console.info('header:' + JSON.stringify(data.header));
console.info('cookies:' + JSON.stringify(data.cookies)); // 8+
} else {
console.info('error:' + JSON.stringify(err));
// 取消訂閱HTTP響應(yīng)頭事件
httpRequest.off('headersReceive');
// 當(dāng)該請(qǐng)求使用完畢時(shí),調(diào)用destroy方法主動(dòng)銷(xiāo)毀
httpRequest.destroy();
}
}
);
場(chǎng)景布局
基礎(chǔ)頁(yè)面組件代碼
考慮到實(shí)際的場(chǎng)景會(huì)用到網(wǎng)絡(luò)請(qǐng)求加載,因此這里將發(fā)揮 [@BuilderParam] 裝飾器作用,先定義基礎(chǔ)頁(yè)面
組件中定義了 @Prop netLoad:boolean 變量來(lái)控制是否展示加載動(dòng)畫(huà)
@Component
export struct BasePage {
@Prop netLoad: boolean
//指向一個(gè)組件
@BuilderParam aB0: () = > {}
build(){
Stack(){
//為組件占位
this.aB0()
if (this.netLoad) {
LoadingProgress()
.width(px2vp(150))
.height(px2vp(150))
.color(Color.Blue)
}
}.hitTestBehavior(HitTestMode.None)
}
}
主頁(yè)面布局代碼
import { BasePage } from './BasePage'
@Entry
@Component
struct NetIndex {
@State netLoad: number = 0
@State msg: string = ''
build() {
Stack(){
BasePage({netLoad: this.netLoad != 0}) {
Column( {space: 20} ){
Row({space: 20}){
Text('WeiBo').fontColor(Color.Black)
Text('UniDemo').fontColor(Color.Black)
Text('HuaWei').fontColor(Color.Black)
}
Row({space: 20}){
Text('WeiBo' + this.weiboIndex)
Text('UniDemo' + this.uniIndex)
Text('HuaWei' + this.huaweiIndex)
}
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求 - 異步').fontSize(20).onClick( () = > {
...
})
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求 - 同步').fontSize(20).onClick( () = > {
...
})
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求-自定義方法裝飾器').fontSize(20).onClick( () = > {
...
})
Scroll() {
Text(this.msg).width('100%')
}
.scrollable(ScrollDirection.Vertical)
}
.width('100%')
.height('100%')
.padding({top: px2vp(120)})
}
}
}
}
簡(jiǎn)單裝封裝網(wǎng)絡(luò)請(qǐng)求
函數(shù)傳參,直接調(diào)用封裝方法
WeiBo為數(shù)據(jù)結(jié)構(gòu)體,暫時(shí)不用關(guān)心,后續(xù)會(huì)貼出完整代碼,這里僅僅是演示網(wǎng)絡(luò)請(qǐng)求用法
//引用封裝好的HNet網(wǎng)絡(luò)工具類(lèi)
import HNet from './util/HNet'
@State msg: string = ''
getWeiBoData(){
HNet.get< WeiBo >({
url: 'https://m.weibo.cn/api/feed/trendtop?containerid=102803_ctg1_4188_-_ctg1_4188',
}).then( (r) = > {
this.msg = ''
if(r.code == 0 && r.result){
r.result.data.statuses.forEach((value: WeiBoItem) = > {
this.msg = this.msg.concat(value.created_at + ' ' + value.id + 'n')
})
} else {
this.msg = r.code + ' ' + r.msg
}
console.log('順序-weibo-' + (new Date().getTime() - starTime))
this.netLoad--
})
}
自定義方法裝飾器,完成傳參調(diào)用
網(wǎng)絡(luò)請(qǐng)求樣例
NetController.getWeiBo< WeiBo >().then( r = > {
......
})
復(fù)制
按照業(yè)務(wù)定義傳參
import { Get, NetResponse } from './util/HNet'
export default class BizNetController {
@Get('https://m.weibo.cn/api/feed/trendtop?containerid=102803_ctg1_4188_-_ctg1_4188')
static getWeiBo< WeiBo >(): Promise< NetResponse< WeiBo >>{ return }
}
復(fù)制
封裝的網(wǎng)絡(luò)請(qǐng)求代碼
import http from '@ohos.net.http';
//自定義網(wǎng)絡(luò)請(qǐng)求參數(shù)對(duì)象
class NetParams{
url: string
extraData?: JSON
}
//自定義數(shù)據(jù)公共結(jié)構(gòu)體
export class NetResponse< T > {
result: T
code: number
msg: string
}
//網(wǎng)絡(luò)封裝工具類(lèi)
class HNet {
//POST 請(qǐng)求方法
static post< T >(options: NetParams): Promise< NetResponse< T >>{
return this.request(options, http.RequestMethod.POST)
}
//GET 請(qǐng)求方法
static get< T >(options: NetParams): Promise< NetResponse< T >>{
return this.request(options, http.RequestMethod.GET)
}
private static request< T >(options: NetParams, method: http.RequestMethod): Promise< NetResponse< T >>{
let r = http.createHttp()
return r.request(options.url, {
method: method,
extraData: options.extraData != null ? JSON.stringify(options.extraData) : null
}).then( (response: http.HttpResponse) = > {
let netResponse = new NetResponse< T >()
let dataType = typeof response.result
if(dataType === 'string'){
console.log('結(jié)果為字符串類(lèi)型')
}
if(response.responseCode == 200){
netResponse.code = 0
netResponse.msg = 'success'
netResponse.result = JSON.parse(response.result as string)
} else {
//出錯(cuò)
netResponse.code = -1
netResponse.msg = 'error'
}
return netResponse
}).catch( reject = > {
console.log('結(jié)果發(fā)生錯(cuò)誤')
let netResponse = new NetResponse< T >()
netResponse.code = reject.code
netResponse.msg = reject.message
return netResponse
}).finally( () = > {
//網(wǎng)絡(luò)請(qǐng)求完成后,需要進(jìn)行銷(xiāo)毀
r.destroy()
})
}
}
export default HNet
//用于裝飾器傳參
export function Get(targetUrl: string) : MethodDecorator {
return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) = > {
//替換方法
descriptor.value = () = > {
let options = new NetParams()
options.url = targetUrl
return HNet.get(options)
}
}
}
完整代碼
代碼結(jié)構(gòu)
net/BasePage.ets
net/NetRequest.ets
net/util/HNet.ts
net/viewmodel/WeiBoModel.ts
net/BizNetController.ets
詳細(xì)代碼
@Component
export struct BasePage {
@Prop netLoad: boolean
@BuilderParam aB0: () = > {}
build(){
Stack(){
this.aB0()
if (this.netLoad) {
LoadingProgress()
.width(px2vp(150))
.height(px2vp(150))
.color(Color.Blue)
}
}.hitTestBehavior(HitTestMode.None)
}
}
import HNet from './util/HNet'
import NetController from './BizNetController'
import { WeiBo, WeiBoItem } from './viewmodel/WeiBoModel'
import { BasePage } from './BasePage'
@Entry
@Component
struct NetIndex {
@State netLoad: number = 0
@State msg: string = ''
@State weiboColor: Color = Color.Black
@State uniColor: Color = Color.Black
@State huaweiColor: Color = Color.Black
@State weiboIndex: number = 1
@State uniIndex: number = 2
@State huaweiIndex: number = 3
private TEST_Target_URL: string[] = [
'https://m.weibo.cn/api/feed/trendtop?containerid=102803_ctg1_4188_-_ctg1_4188',
'https://unidemo.dcloud.net.cn/api/news',
'https://developer.huawei.com/config/cn/head.json',
]
build() {
Stack(){
BasePage({netLoad: this.netLoad != 0}) {
Column( {space: 20} ){
Row({space: 20}){
Text('WeiBo').fontColor(Color.Black)
Text('UniDemo').fontColor(Color.Black)
Text('HuaWei').fontColor(Color.Black)
}
Row({space: 20}){
Text('WeiBo' + this.weiboIndex).fontColor(this.weiboColor)
Text('UniDemo' + this.uniIndex).fontColor(this.uniColor)
Text('HuaWei' + this.huaweiIndex).fontColor(this.huaweiColor)
}
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求 - 異步').fontSize(20).onClick( () = > {
this.weiboColor = Color.Black
this.uniColor = Color.Black
this.huaweiColor = Color.Black
this.weiboIndex = 1
this.uniIndex = 2
this.huaweiIndex = 3
this.asyncGetData()
})
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求 - 同步').fontSize(20).onClick( () = > {
this.weiboColor = Color.Black
this.uniColor = Color.Black
this.huaweiColor = Color.Black
this.weiboIndex = 1
this.uniIndex = 2
this.huaweiIndex = 3
this.syncGetData()
})
Button('開(kāi)始網(wǎng)絡(luò)請(qǐng)求-自定義方法裝飾器').fontSize(20).onClick( () = > {
this.getWeiBoListByController()
})
Scroll() {
Text(this.msg).width('100%')
}
.scrollable(ScrollDirection.Vertical)
}
.width('100%')
.height('100%')
.padding({top: px2vp(120)})
}
}
}
asyncGetData(){
this.netLoad = 3;
this.TEST_Target_URL.forEach( (value) = > {
HNet.get({
url: value,
}).then( (r) = > {
this.msg = JSON.stringify(r)
if(value.indexOf('weibo') != -1){
this.weiboColor = Color.Green
this.weiboIndex = 3 - this.netLoad + 1
} else if(value.indexOf('unidemo') != -1){
this.uniColor = Color.Green
this.uniIndex = 3 - this.netLoad + 1
} else if(value.indexOf('huawei') != -1){
this.huaweiColor = Color.Green
this.huaweiIndex = 3 - this.netLoad + 1
}
this.netLoad--
})
})
}
async syncGetData() {
let starTime
let url
this.netLoad = 3;
starTime = new Date().getTime()
url = this.TEST_Target_URL[0]
starTime = new Date().getTime()
if(url.indexOf('weibo') != -1){
console.log('順序-請(qǐng)求-weibo')
} else if(url.indexOf('unidemo') != -1){
console.log('順序-請(qǐng)求-unidemo')
} else if(url.indexOf('huawei') != -1){
console.log('順序-請(qǐng)求-huawei')
}
await HNet.get< WeiBo >({
url: url,
}).then( (r) = > {
this.msg = ''
if(r.code == 0 && r.result){
r.result.data.statuses.forEach((value: WeiBoItem) = > {
this.msg = this.msg.concat(value.created_at + ' ' + value.id + 'n')
})
} else {
this.msg = r.code + ' ' + r.msg
}
if(url.indexOf('weibo') != -1){
this.weiboColor = Color.Green
this.weiboIndex = 3 - this.netLoad + 1
console.log('順序-返回-weibo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('unidemo') != -1){
this.uniColor = Color.Green
this.uniIndex = 3 - this.netLoad + 1
console.log('順序-返回-unidemo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('huawei') != -1){
this.huaweiColor = Color.Green
this.huaweiIndex = 3 - this.netLoad + 1
console.log('順序-返回-huawei-' + (new Date().getTime() - starTime))
}
this.netLoad--
})
starTime = new Date().getTime()
url = this.TEST_Target_URL[1]
starTime = new Date().getTime()
if(url.indexOf('weibo') != -1){
console.log('順序-請(qǐng)求-weibo')
} else if(url.indexOf('unidemo') != -1){
console.log('順序-請(qǐng)求-unidemo')
} else if(url.indexOf('huawei') != -1){
console.log('順序-請(qǐng)求-huawei')
}
await HNet.get({
url: url,
}).then( (r) = > {
this.msg = JSON.stringify(r)
if(url.indexOf('weibo') != -1){
this.weiboColor = Color.Green
this.weiboIndex = 3 - this.netLoad + 1
console.log('順序-返回-weibo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('unidemo') != -1){
this.uniColor = Color.Green
this.uniIndex = 3 - this.netLoad + 1
console.log('順序-返回-unidemo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('huawei') != -1){
this.huaweiColor = Color.Green
this.huaweiIndex = 3 - this.netLoad + 1
console.log('順序-返回-huawei-' + (new Date().getTime() - starTime))
}
this.netLoad--
})
starTime = new Date().getTime()
url = this.TEST_Target_URL[2]
starTime = new Date().getTime()
if(url.indexOf('weibo') != -1){
console.log('順序-請(qǐng)求-weibo')
} else if(url.indexOf('unidemo') != -1){
console.log('順序-請(qǐng)求-unidemo')
} else if(url.indexOf('huawei') != -1){
console.log('順序-請(qǐng)求-huawei')
}
await HNet.get({
url: url,
}).then( (r) = > {
this.msg = JSON.stringify(r)
if(url.indexOf('weibo') != -1){
this.weiboColor = Color.Green
this.weiboIndex = 3 - this.netLoad + 1
console.log('順序-返回-weibo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('unidemo') != -1){
this.uniColor = Color.Green
this.uniIndex = 3 - this.netLoad + 1
console.log('順序-返回-unidemo-' + (new Date().getTime() - starTime))
} else if(url.indexOf('huawei') != -1){
this.huaweiColor = Color.Green
this.huaweiIndex = 3 - this.netLoad + 1
console.log('順序-返回-huawei-' + (new Date().getTime() - starTime))
}
this.netLoad--
})
}
getHuaWeiSomeDataByNet(){
this.netLoad = 1
let starTime = new Date().getTime()
console.log('順序-huawei-請(qǐng)求' + starTime)
HNet.get({
url: 'https://developer.huawei.com/config/cn/head.json',
}).then( (r) = > {
this.msg = JSON.stringify(r, null, 't')
this.netLoad--
console.log('順序-huawei-' + (new Date().getTime() - starTime))
})
}
getWeiBoListByHNet(){
this.netLoad = 1
let starTime = new Date().getTime()
console.log('順序-weibo-請(qǐng)求' + starTime)
HNet.get< WeiBo >({
url: 'https://m.weibo.cn/api/feed/trendtop?containerid=102803_ctg1_4188_-_ctg1_4188',
}).then( (r) = > {
this.msg = ''
if(r.code == 0 && r.result){
r.result.data.statuses.forEach((value: WeiBoItem) = > {
this.msg = this.msg.concat(value.created_at + ' ' + value.id + 'n')
})
} else {
this.msg = r.code + ' ' + r.msg
}
console.log('順序-weibo-' + (new Date().getTime() - starTime))
this.netLoad--
})
}
getWeiBoListByController(){
this.netLoad = 1
NetController.getWeiBo< WeiBo >().then( r = > {
this.msg = ''
if(r.code == 0 && r.result){
r.result.data.statuses.forEach((value: WeiBoItem) = > {
this.msg = this.msg.concat(value.created_at + ' ' + value.id + 'n' + value.source + 'n')
})
} else {
this.msg = r.code + ' ' + r.msg
}
this.netLoad--
})
}
}
import { Get, NetResponse } from './util/HNet'
export default class BizNetController {
@Get('https://m.weibo.cn/api/feed/trendtop?containerid=102803_ctg1_4188_-_ctg1_4188')
static getWeiBo< WeiBo >(): Promise< NetResponse< WeiBo >>{ return }
}
import http from '@ohos.net.http';
class NetParams{
url: string
extraData?: JSON
}
export class NetResponse< T > {
result: T
code: number
msg: string
}
class HNet {
static post< T >(options: NetParams): Promise< NetResponse< T >>{
return this.request(options, http.RequestMethod.POST)
}
static get< T >(options: NetParams): Promise< NetResponse< T >>{
return this.request(options, http.RequestMethod.GET)
}
private static request< T >(options: NetParams, method: http.RequestMethod): Promise< NetResponse< T >>{
let r = http.createHttp()
return r.request(options.url, {
method: method,
extraData: options.extraData != null ? JSON.stringify(options.extraData) : null
}).then( (response: http.HttpResponse) = > {
let netResponse = new NetResponse< T >()
let dataType = typeof response.result
if(dataType === 'string'){
console.log('結(jié)果為字符串類(lèi)型')
}
if(response.responseCode == 200){
netResponse.code = 0
netResponse.msg = 'success'
netResponse.result = JSON.parse(response.result as string)
} else {
//出錯(cuò)
netResponse.code = -1
netResponse.msg = 'error'
}
return netResponse
}).catch( reject = > {
console.log('結(jié)果發(fā)生錯(cuò)誤')
let netResponse = new NetResponse< T >()
netResponse.code = reject.code
netResponse.msg = reject.message
return netResponse
}).finally( () = > {
r.destroy()
})
}
}
export default HNet
export function Get(targetUrl: string) : MethodDecorator {
return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) = > {
//替換方法
descriptor.value = () = > {
let options = new NetParams()
options.url = targetUrl
return HNet.get(options)
}
}
}
export class WeiBo{
ok: number
http_code: number
data: WeiBoDataObj
}
export class WeiBoDataObj{
total_number: number
interval: number
remind_text: string
page: number
statuses: Array< WeiBoItem >
}
export class WeiBoItem{
created_at: string
id: string
source: string
textLength: number
}
-
移動(dòng)開(kāi)發(fā)
+關(guān)注
關(guān)注
0文章
52瀏覽量
10019 -
鴻蒙
+關(guān)注
關(guān)注
57文章
2457瀏覽量
43452 -
HarmonyOS
+關(guān)注
關(guān)注
79文章
2001瀏覽量
31418 -
OpenHarmony
+關(guān)注
關(guān)注
25文章
3785瀏覽量
17340 -
鴻蒙OS
+關(guān)注
關(guān)注
0文章
190瀏覽量
4734
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
鴻蒙開(kāi)發(fā)實(shí)戰(zhàn):網(wǎng)絡(luò)請(qǐng)求庫(kù)【axios】

鴻蒙OS開(kāi)發(fā)實(shí)例:【工具類(lèi)封裝-http請(qǐng)求】

鴻蒙OS應(yīng)用程序開(kāi)發(fā)
鴻蒙應(yīng)用開(kāi)發(fā)請(qǐng)求不到數(shù)據(jù)是為什么?
鴻蒙 OS 應(yīng)用開(kāi)發(fā)初體驗(yàn)
嵌入式系統(tǒng)設(shè)計(jì)與實(shí)例開(kāi)發(fā)—ARM與uC/OS-Ⅱ
華為鴻蒙OS 2.0帶來(lái)哪些智慧體驗(yàn)?
鴻蒙OS 2.0手機(jī)開(kāi)發(fā)者Beta版發(fā)布會(huì)在京舉辦
華為發(fā)布鴻蒙OS Beta版
鴻蒙OS與Lite OS的區(qū)別是什么
鴻蒙os怎么升級(jí)
華為開(kāi)發(fā)者大會(huì)2021鴻蒙os在哪場(chǎng)
鴻蒙OS開(kāi)發(fā)實(shí)戰(zhàn):【網(wǎng)絡(luò)管理HTTP數(shù)據(jù)請(qǐng)求】

鴻蒙OS開(kāi)發(fā)實(shí)例:【HarmonyHttpClient】網(wǎng)絡(luò)框架

評(píng)論