发生 406 错误。由于输入结束错误,没有要映射的内容
406 error occurred. No content to map due to end-of-input error
我请求 https://rdap.lacnic.net/rdap/ip/190.42.216.128 获取 IP 信息,但出现 406 错误。由于输入结束错误
,没有要映射的内容
在网络浏览器中200 OK是出来json数据,但是在使用SpringResttemplate时,出现406错误。这是我使用科特林的代码。这是为什么?
val uri = UriComponentsBuilder
.fromUriString("https://rdap.lacnic.net/rdap/ip/190.42.216.128")
.build()
restTemplate.getForEntity(uri.toUriString(), JsonNode::class.java)
The HyperText Transfer Protocol (HTTP) 406 Not Acceptable client error
response code indicates that the server cannot produce a response
matching the list of acceptable values defined in the request's
proactive content negotiation headers, and that the server is
unwilling to supply a default representation.
参考 here.
我请求 https://rdap.lacnic.net/rdap/ip/190.42.216.128 获取 IP 信息,但出现 406 错误。由于输入结束错误
,没有要映射的内容在网络浏览器中200 OK是出来json数据,但是在使用SpringResttemplate时,出现406错误。这是我使用科特林的代码。这是为什么?
val uri = UriComponentsBuilder
.fromUriString("https://rdap.lacnic.net/rdap/ip/190.42.216.128")
.build()
restTemplate.getForEntity(uri.toUriString(), JsonNode::class.java)
The HyperText Transfer Protocol (HTTP) 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
参考 here.