Class JavaHttpClientRestInvoker
java.lang.Object
org.flowable.external.client.impl.JavaHttpClientRestInvoker
- All Implemented Interfaces:
RestInvoker
- Author:
- Filip Hrisafov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final HttpClientprotected final Function<String,HttpRequest.Builder> -
Constructor Summary
ConstructorsConstructorDescriptionJavaHttpClientRestInvoker(Function<String, HttpRequest.Builder> requestBuilderCreator, HttpClient httpClient) -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaHttpClientRestInvokerwithAccessToken(String baseUrl, String accessToken) static JavaHttpClientRestInvokerwithAccessToken(String baseUrl, Supplier<String> accessToken) protected static JavaHttpClientRestInvokerwithAuthorizationHeader(String baseUrl, Supplier<String> authorizationHeaderProvider) static JavaHttpClientRestInvokerwithBasicAuth(String baseUrl, String username, String password) static JavaHttpClientRestInvokerwithoutAuthentication(String baseUrl)
-
Field Details
-
requestBuilderCreator
-
httpClient
-
-
Constructor Details
-
JavaHttpClientRestInvoker
public JavaHttpClientRestInvoker(Function<String, HttpRequest.Builder> requestBuilderCreator, HttpClient httpClient)
-
-
Method Details
-
post
public RestResponse<String> post(String path, com.fasterxml.jackson.databind.node.ObjectNode requestBody) - Specified by:
postin interfaceRestInvoker
-
withBasicAuth
public static JavaHttpClientRestInvoker withBasicAuth(String baseUrl, String username, String password) -
withAccessToken
-
withAccessToken
public static JavaHttpClientRestInvoker withAccessToken(String baseUrl, Supplier<String> accessToken) -
withoutAuthentication
-
withAuthorizationHeader
protected static JavaHttpClientRestInvoker withAuthorizationHeader(String baseUrl, Supplier<String> authorizationHeaderProvider)
-