且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法使用c#HttpClient发送Content-Type标头

更新时间:2022-06-15 22:15:32

与之配合使用

ByteArrayContent byteContent = new ByteArrayContent(allContentBytes);
byteContent.Headers.Remove("Content-Type");
byteContent.Headers.Add("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundaryaYcxA3wAp5XMUV2w");