Skip to content

Commit

Permalink
RestClient: Legger til sendReturnUnhandledNoRetry som ikke retryer ve… (
Browse files Browse the repository at this point in the history
#1248)

RestClient: Legger til sendReturnUnhandledNoRetry som ikke retryer ved feil
  • Loading branch information
espenwaaga authored Feb 20, 2023
1 parent a181166 commit fde1102
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public HttpResponse<String> sendReturnUnhandled(HttpClientRequest request) {
return doSendExpectStringRetry(request.request());
}

public HttpResponse<String> sendReturnUnhandledNoRetry(HttpClientRequest request) {
return doSendExpectString(request.request());
}

private HttpResponse<byte[]> doSendExpectBytearrayRetry(HttpRequest httpRequest) {
int i = RETRIES;
while (i-- > 0) {
Expand Down Expand Up @@ -111,4 +115,6 @@ private HttpResponse<String> doSendExpectString(HttpRequest request) {
}
}


}

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public HttpResponse<String> sendReturnUnhandled(RestRequest request) {
return httpklient.sendReturnUnhandled(request);
}

public HttpResponse<String> sendReturnUnhandledNoRetry(RestRequest request) {
return httpklient.sendReturnUnhandledNoRetry(request);
}

private <T> T mapResponse(String response, Predicate<String> filterOut, Class<T> clazz) {
if (response == null || filterOut.test(response)) {
return null;
Expand Down

0 comments on commit fde1102

Please sign in to comment.