参考官方文档https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/remote-communication-rcp-V5\#section1188301010515let headers: rcp.RequestHeaders = { "accept": "application/json" }; let configuration: rcp.Configuration = { transfer: { timeout: { connectMs: 60000, transferMs: 60000 } } }; let cookies: rcp.RequestCookies = { 'name1': 'value1', 'name2': 'value2' }; let transferRange: rcp.TransferRange = { from: 100, to: 200 }; const simpleForm = new rcp.Form({ "key1": "value1", "key2": ["valueList0", "valueList1"], }) let req = new rcp.Request("http://example.com", "POST", headers, simpleForm, cookies, transferRange, configuration); req.content = simpleForm;
参考官方文档
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/remote-communication-rcp-V5\#section1188301010515