//点击按钮 开始上传
private async void shujuupload_Click(object sender, RoutedEventArgs e)
{
// 把文件读取到二进制数组
FileStream fs = new FileStream(_path, FileMode.Open, FileAccess.Read);
byte[] buffer = new byte[1024 * 1024];
await fs.ReadAsync(buffer, 0, buffer.Length);
HttpResponseMessage response = await client.PostAsJsonAsync("http://localhost:50935/api/User/ postuserinfo", buffer);
response.EnsureSuccessStatusCode();
}
api 的postuserinfo()怎么写?我连怎么接收post过来的数据都不知道,用哪个类?什么方式?小白一个(自学的),求大神指点