• 调用接口的请求方式


    HttpHeaders headers = new HttpHeaders();
    HashMap<String, Object> signMap1 = new HashMap<String, Object>();
    HashMap<String, Object> signMap = new HashMap<String, Object>();
    HashMap<String, Object> signMap0 = new HashMap<String, Object>();
    signMap.put("appid", "Test");
    signMap.put("appkey", "Test");
    signMap.put("scenario", "SC01");
    signMap.put("interfaceno", "NB00002");
    signMap.put("operator", "Test");
    signMap.put("timeStamp", "20190123133755275");
    signMap1.put("data", signMap);
    System.out.println(JsonUtils.transferToJson(signMap1));
    headers.add("sign", SignUtil.getSign(signMap1, SignUtil.secretKeyOfWxh));
    HttpEntity<String> requestEntity = new HttpEntity<String>(JsonUtils.transferToJsonNoFormat(signMap1), headers);
    RestTemplate restTemplate = new RestTemplate();
    String post = restTemplate.postForObject("http://10.8.201.47:8080/services/api/authentication/certification", requestEntity, String.class);
    System.out.println(requestEntity);
    System.out.println(post);
  • 相关阅读:
    vue中的具名插槽
    vue中默认插槽slot
    局部组件使用指令-方法-过滤器-计算属性
    vue创建局部组件
    Class Metaprogramming
    Attribute Descriptors
    Dynamic Attributes and Properties
    Concurrency with asyncio
    Concurrency with Futures
    Coroutines
  • 原文地址:https://www.cnblogs.com/otways/p/10833212.html
Copyright © 2020-2023  润新知