I/O error on GET request for "http://localhost/user/1": Connection refused: connect; nested excepti

I/O error on GET request for “http://localhost/user/1”: Connection refused: connect; nested excepti错误解决

常见的几种出错原因

1.访问地址有误
2.返回格式有问题

记一次自己的错误

返回格式有问题,一个返回的是字符串,而另一个解析的是一个对象
I/O error on GET request for "http://localhost/user/1": Connection refused: connect; nested excepti
解决方法:两个返回的类型一致即可
I/O error on GET request for "http://localhost/user/1": Connection refused: connect; nested exceptiI/O error on GET request for "http://localhost/user/1": Connection refused: connect; nested excepti

总结

遇到这样的问题归根结底主要还是自己检查的不够仔细,以此文章告诫自己!也希望各位不要犯一样的错误。