| | |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("POST"); |
| | | connection.setDoOutput(true); |
| | | connection.setRequestProperty("content-type", "application/json;charset=UTF-8"); |
| | | connection.setRequestProperty("content-type", "application/json;charset=utf-8"); |
| | | connection.connect(); |
| | | // post发送的参数 |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | int len = -1; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while((len = in.read(b)) != -1) { |
| | | sb.append(new String(b,0,len,"UTF-8")); |
| | | sb.append(new String(b,0,len,"utf-8")); |
| | | } |
| | | |
| | | in.close(); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "拉取公众号列表") |
| | | @GetMapping(value = "/list/noToken",produces="application/json;charset=UTF-8") |
| | | @GetMapping(value = "/list/noToken") |
| | | public R pageDiscuss() throws Exception{ |
| | | WxOfficialApi officialApi = new WxOfficialApi(); |
| | | |