网络框架 4.6 中的此示例代码
byte[] myByte = etc;
WebClient webClient = new WebClient();
webClient.Headers.Clear();
webClient.Headers.Add("Content-Type", "application/json");
webClient.Headers.Add("Authorization", "Bearer " + ChannelAccessToken);
var a1 = webClient.DownloadData("https://api.myweb.com/1");
var b1 = webClient.UploadData("https://api.myweb.com/2", myByte );
在网络框架中,我可以使用此代码上传字节数组以链接网络,我想上传/下载现在我需要更改以编写网络核心我如何在网络核心中编写此代码?