add missing doXXX methods with KeycloakSession usage
closes #30302 Signed-off-by: Niko Köbler <niko@n-k.de>
This commit is contained in:
parent
51d80a42d5
commit
72f994dc1c
1 changed files with 15 additions and 0 deletions
|
@ -125,14 +125,29 @@ public class SimpleHttp {
|
|||
return new SimpleHttp(url, "POST", client, maxConsumedResponseSize);
|
||||
}
|
||||
|
||||
public static SimpleHttp doPut(String url, KeycloakSession session) {
|
||||
HttpClientProvider provider = session.getProvider(HttpClientProvider.class);
|
||||
return doPut(url, provider.getHttpClient(), provider.getMaxConsumedResponseSize());
|
||||
}
|
||||
|
||||
protected static SimpleHttp doPut(String url, HttpClient client, long maxConsumedResponseSize) {
|
||||
return new SimpleHttp(url, "PUT", client, maxConsumedResponseSize);
|
||||
}
|
||||
|
||||
public static SimpleHttp doHead(String url, KeycloakSession session) {
|
||||
HttpClientProvider provider = session.getProvider(HttpClientProvider.class);
|
||||
return doHead(url, provider.getHttpClient(), provider.getMaxConsumedResponseSize());
|
||||
}
|
||||
|
||||
protected static SimpleHttp doHead(String url, HttpClient client, long maxConsumedResponseSize) {
|
||||
return new SimpleHttp(url, "HEAD", client, maxConsumedResponseSize);
|
||||
}
|
||||
|
||||
public static SimpleHttp doPatch(String url, KeycloakSession session) {
|
||||
HttpClientProvider provider = session.getProvider(HttpClientProvider.class);
|
||||
return doPatch(url, provider.getHttpClient(), provider.getMaxConsumedResponseSize());
|
||||
}
|
||||
|
||||
protected static SimpleHttp doPatch(String url, HttpClient client, long maxConsumedResponseSize) {
|
||||
return new SimpleHttp(url, "PATCH", client, maxConsumedResponseSize);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue