Skip to content

Commit

Permalink
MOVE-4138 Gateway debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hmengland committed Aug 20, 2024
1 parent da39dd2 commit 055e016
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,21 @@ public class DefaultFregGatewayClient implements FregGatewayClient {

@Override
public Optional<FregGatewayEntity.Address.Response> getPersonAdress(String pid) {
ResponseEntity<FregGatewayEntity.Address.Response> response = restTemplate.getForEntity(
properties.getFreg().getEndpointURL() + "person/personadresse/{pid}",
FregGatewayEntity.Address.Response.class, pid);
return Optional.of(response.getBody());
System.out.println("getPersonAdress method called with pid: " + pid);
String url = properties.getFreg().getEndpointURL() + "person/personadresse/" + pid;
System.out.println("Constructed URL: " + url);
ResponseEntity<FregGatewayEntity.Address.Response> response = restTemplate.getForEntity(
url,
FregGatewayEntity.Address.Response.class,
pid);

System.out.println("Response received with status code: " + response.getStatusCode());

FregGatewayEntity.Address.Response responseBody = response.getBody();
System.out.println("Response body: " + responseBody);

return Optional.of(responseBody);
}
}


0 comments on commit 055e016

Please sign in to comment.