使用restTemplate.exchange()进行API调用时,如何在编码后的参数上发送重定向URL?

时间:2019-10-16 10:56:11

标签: spring resttemplate

    String url = "https://www.facebook.com/v3.3/dialog/oauth"
    + "?client_id={client_id}&redirect_uri={uri}&access_token={access_token}";

    RestTemplate restTemplate = new RestTemplate();
    HttpHeaders headers = new HttpHeaders();
    HttpEntity<String> request = new HttpEntity<String>(headers);

    restTemplate.exchange(url, HttpMethod.GET, request,clientId, uri, access_token);

在此代码中,我应该使用编码的uri还是纯uri?

0 个答案:

没有答案