客户端http psot 请求报错 415

tech2026-09-01  1

报错信息:

Server returned HTTP response code: 415 for URL: xxx

最后发现是 客户端 http 属性 Content-Type 不对 导致

服务器端接收的 Content-Type 是 application/json;charset=UTF-8

而 客户端 的 Content-Type 是 text/plain; charset=utf-8

将客户端的 Content-Type 改成和 服务器端接口的类型 一致 , 问题解决了

最新回复(0)