HTTP 接口请求406问题处理

HTTP Status 406 -
type Status report

message

description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.

Apache Tomcat/8.0.43

背景:

有个对外请求时提示406报错,而且重试也无法解决,遂怀疑对方服务器兼容性没做好

解决:

http请求添加header: Accept: application/json, text/plain, */*

当前还没有任何评论

写下你最简单的想法