This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1407|Reply: 0

[Source] C# uses HttpClient to call the empty media data issue

[Copy link]
Posted on 2025-2-18 15:41:44 | | | |
Requirements: When using .NET/C# HttpClient to call Enterprise WeChat to upload temporary materials, the error "empty media data" is reported, but it is normal to use postman.

Upload temporary footage documents:The hyperlink login is visible.

postman upload is fine, as shown below:



The HttpClient exception is as follows:

{"errcode":44001,"errmsg":"empty media data, hint: [17398xxx], from ip: xxx, more info atThe hyperlink login is visible."}

The cause of the problem is due to:Inconsistent implementation of RFC 2046 across systems/languagesThe, reference:The hyperlink login is visible.

Solution 1 (recommended)

The code is as follows:

Solution 2

The code is as follows:


Reference:The hyperlink login is visible.




Previous:APNIC manages IPv4 and IPv6 addresses
Next:.NET/C# uses HttpClient common request trick methods
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com