
RestTemplate
Flora_Wong
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
springboot请求http
get 请求 public void doHttpGet(){ RestTemplate restTemplate = new RestTemplate(); /**解决响应数据可能乱码的问题*/ List<HttpMessageConverter<?>> converterList = restTemplate.getMe...原创 2019-11-07 14:24:09 · 127 阅读 · 0 评论 -
springboot 请求https
这两天研究了下springboot 请求https,记录一下遇到的问题及解决方案。 添加依赖 <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependen...原创 2019-11-07 13:58:09 · 1588 阅读 · 0 评论 -
Spring之RestTemplate中级使用篇
前面一篇介绍了如何使用RestTemplate发起post和get请求,然而也只能满足一些基本的场景,对于一些特殊的如需要设置请求头,添加认证信息等场景,却没有提及可以怎么做,这一篇则相当于进阶版,将主要介绍 get/post请求如何携带 header post传文件可以怎么玩, post提交json串怎么处理 exchange方法的使用姿势 I. 请求头设置 首先一个问题就是为什么要设置...转载 2019-11-06 09:11:31 · 207 阅读 · 0 评论