更新时间:2023-02-15 07:49:12
我建议您使用的 async-await 关键字,您可以像这样更改代码以获取结果:
what I would suggest to you is using the async-await keywords here, you can change your code like this to get the results:
HttpResponseMessage file = await httpclinet.GetAsync("url");
var stream = await file.Content.ReadAsStreamAsync()
此外,您还需要添加 async
关键字,例如:
Also you need to add the async
keyword to your method like this:
public async Task<HttpResponseMessage> download(string fileid)