Skip to content

Commit

Permalink
Det skulle ikke være en header her....
Browse files Browse the repository at this point in the history
  • Loading branch information
OdaDahlen committed Dec 11, 2023
1 parent 64d5fbb commit 00208d6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public Personalia hentPersonalia(Fnr fnr, String behandlingsnummer) {
.url(joinPaths(veilarbpersonUrl, "/api/v3/hent-person"))
.header(ACCEPT, APPLICATION_JSON_VALUE)
.header(AUTHORIZATION, userTokenSupplier.get())
.header("behandlingsnummer", behandlingsnummer)
.post(RestUtils.toJsonRequestBody(new PersonRequest(fnr)))
.post(RestUtils.toJsonRequestBody(new PersonRequest(fnr, behandlingsnummer)))
.build();

try (okhttp3.Response response = client.newCall(request).execute()) {
Expand All @@ -61,6 +60,6 @@ private static class GeografiskTilknytningResponse {
String geografiskTilknytning;
}

private record PersonRequest(Fnr fnr) {
private record PersonRequest(Fnr fnr, String behandlingsnummer) {
}
}

0 comments on commit 00208d6

Please sign in to comment.