Examples of exchange()


Examples of org.springframework.web.client.RestTemplate.exchange()

    ResponseEntity<Response<GetResourceAllocationSummaryResponse>> response = null;
    HttpEntity<String> httpEntity = new HttpEntity<String>(
        objectMapper.writeValueAsString(request), headers);

    response = restTemplate
        .exchange(
            getBaseServiceUrl()
                + "/ResourceService1.svc/GetResourceAllocationSummary",
            HttpMethod.POST,
            httpEntity,
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

    ResponseEntity<Response<Resource>> response = null;
    HttpEntity<String> httpEntity = new HttpEntity<String>(
        objectMapper.writeValueAsString(request), headers);

    response = restTemplate.exchange(getBaseServiceUrl()
        + "/ResourceService1.svc/GetResourceDetails", HttpMethod.POST,
        httpEntity,
        new ParameterizedTypeReference<Response<Resource>>() {
        });
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

    ResponseEntity<Response<GetResourceTaskAllocationDetailsResponse>> response = null;
    HttpEntity<String> httpEntity = new HttpEntity<String>(
        objectMapper.writeValueAsString(request), headers);

    response = restTemplate
        .exchange(
            getBaseServiceUrl()
                + "/ResourceService1.svc/GetResourceTaskAllocationDetails",
            HttpMethod.POST,
            httpEntity,
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

    RestTemplate restTemplate = new RestTemplate(clientHttpRequestFactory);

    ResponseEntity<Response<User[]>> response = null;
    HttpEntity<String> httpEntity = new HttpEntity<String>(headers);

    response = restTemplate.exchange(getBaseServiceUrl()
        + "/UserService1.svc/GetAllUsers", HttpMethod.POST, httpEntity,
        new ParameterizedTypeReference<Response<User[]>>() {
        });

    return response.getBody().getD();
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

        RestTemplate restTemplate = new RestTemplate();

        HttpHeaders tokenRequestHeaders = new HttpHeaders();
        tokenRequestHeaders.set("Authorization", getAuthorizationHeader(clientId, clientSecret));

        Map<String, String> tokenResponse = restTemplate.exchange(
                identityServerUrl + "/oauth/token?grant_type=client_credentials",
                HttpMethod.POST,
                new HttpEntity<>(tokenRequestHeaders),
                Map.class).getBody();
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

        String scimResponse = null;

        switch (filterField) {
            case USERNAME:
                scimResponse = restTemplate.exchange(
                        identityServerUrl + "/Users/" + "?filter=userName eq \"" + filterValue + "\"",
                        HttpMethod.GET,
                        new HttpEntity<>(scimRequestHeaders),
                        String.class).getBody();
                break;
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

                        HttpMethod.GET,
                        new HttpEntity<>(scimRequestHeaders),
                        String.class).getBody();
                break;
            case USERID:
                scimResponse = restTemplate.exchange(
                        identityServerUrl + "/Users/" + filterValue,
                        HttpMethod.GET,
                        new HttpEntity<>(scimRequestHeaders),
                        String.class).getBody();
                break;
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

      MultiValueMap<String, String> postParameters = new LinkedMultiValueMap<String, String>();

      HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(
          postParameters, requestHeaders);

      ResponseEntity<byte[]> response = httpClient.exchange(url,
          HttpMethod.GET, requestEntity, byte[].class);

      System.out.println(response);

      assertTrue("The server doesn't accept ranges", response
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

      MultiValueMap<String, String> postParameters = new LinkedMultiValueMap<String, String>();

      HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(
          postParameters, requestHeaders);

      ResponseEntity<byte[]> response = httpClient.exchange(url,
          HttpMethod.GET, requestEntity, byte[].class);

      System.out.println(response);

      assertEquals(
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.exchange()

      MultiValueMap<String, String> postParameters = new LinkedMultiValueMap<String, String>();

      HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(
          postParameters, requestHeaders);

      ResponseEntity<byte[]> response = httpClient.exchange(url,
          HttpMethod.GET, requestEntity, byte[].class);

      System.out.println(response);

      assertEquals(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.