问题: springboot 除了HttpURLConnection 发送post请求,还有什么好用的类发送?
描述:

如题,HttpURLConnection是传统发送post请求方式,springboot有什么更好的请求方式吗?


解决方案1:

HTTPClient

解决方案2:

RestTemplate/Feign/
RestTemplate比较好一点,有对异步的支持

解决方案3:

HttpClient或者OkHTTP

解决方案4:

httpclient客户端请求操作、常用工具类:https://gitee.com/janda/codes...

解决方案5:

先说明下http的发展,首先是httpurlconnection,然后是apache的httpclient,然后是spring的resttemplate。最优雅的当然是springcloud中的feign

上一篇spring mvc的拦截器中:为了对url做权限控制,需要获取请求类型
下一篇读取 sourceconf 配置文件后,如何提取出name、x、y的值分别放到不同的数组中
明星图片
相关文章
《 springboot 除了HttpURLConnection 发送post请求,还有什么好用的类发送?》由码蚁之家搜集整理于网络,
联系邮箱:mxgf168#qq.com(#改为@)