REST error-The request contain entity body but no Content-Type header.The infered media type application/octet-stream is not support for this resource(REST 错误-请求包含实体主体但没有 Content-Type 标头.推断的媒体类型 application/octet-stream 不支持此资源) - IT屋-程序员软件开发技术分享
问题描述
我正在尝试发送 POST 请求.虽然通过 POSTMAN 发送一切顺利,然后我尝试通过 C# 代码发送:
I'm trying to send POST request. While sending via POSTMAN all goes well, then I try to send it by C# code:
我收到此错误:
请求包含实体主体,但没有 Content-Type 标头.此资源不支持推断的媒体类型application/octet-stream"
The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource
我该如何解决?
推荐答案
试写:
或添加到您的标题中:
这篇关于REST 错误-请求包含实体主体但没有 Content-Type 标头.推断的媒体类型 application/octet-stream 不支持此资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!