Skip to content

restTemplate.exchange doesn't work #12

Description

@hazartilirot

Sergey,

I believe I need a hand with the lesson. I'm watching "Make Users Microservice call Albums Microservice" at the moment. The snippet of code is exactly what bothers me at the moment:

 /*
        String albumsUrl = String.format(environment.getProperty("albums.url"), userId);
        
        ResponseEntity<List<AlbumResponseModel>> albumsListResponse = restTemplate.exchange(albumsUrl, HttpMethod.GET, null, new ParameterizedTypeReference<List<AlbumResponseModel>>() {
        });
        List<AlbumResponseModel> albumsList = albumsListResponse.getBody(); 
        */

In the video it works perfectly fine however I went to the most recent version of your repository

to my surprise the code has been commented out. Wouldn't you mind explaining me what arguments I should provide to the restTemplate.exchange ?

Thank you in advanced.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions