Reputation: 67
this example code in netframework 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 );
In net framework i can use this code to upload byte array to link web its my want to upload/download now i need to change to write net core how can i write this code in net core?
Upvotes: 2
Views: 601