HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported
时间: 2023-09-27 12:09:20 浏览: 231
HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported错误是由于发送的数据格式不正确导致的。在这种情况下,需要修改数据的发送方式以匹配正确的格式。例如,在Postman中,默认的数据格式是text,而实际上发送的数据是json格式的,因此会导致报错。为了解决这个问题,需要在Postman中选择json样式来发送数据,这样就能正确匹配数据的格式。另外,还可以通过配置HTTP信息头管理器来增加消息头Content-Type:application/json;charset=UTF-8,以确保数据以正确的格式进行传输。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported](https://blog.csdn.net/weixin_44299027/article/details/104490196)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [php原生导出excel文件的两种方法(推荐)](https://download.csdn.net/download/weixin_38652636/13725600)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文