@Incubating
final class HttpClientHelper
extends Object
Runtime helper used by the generated declarative HTTP client implementations. Not intended for direct use.
| Constructor and description |
|---|
HttpClientHelper(String baseUrl, Map<String, String> defaultHeaders) |
HttpClientHelper(String baseUrl, Map<String, String> defaultHeaders, int connectTimeoutSeconds, int requestTimeoutSeconds, boolean followRedirects) |
HttpClientHelper(HttpBuilder http, Map<String, String> defaultHeaders)Constructor accepting a pre-configured HttpBuilder instance. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Object |
execute(String method, String urlTemplate, String returnTypeName, Map<String, Object> pathParams, Map<String, Object> queryOrFormParams, Map<String, String> headers, Object body, int timeoutSeconds, String bodyMode, String errorTypeName)Execute an HTTP request synchronously. |
|
CompletableFuture<Object> |
executeAsync(String method, String urlTemplate, String returnTypeName, Map<String, Object> pathParams, Map<String, Object> queryOrFormParams, Map<String, String> headers, Object body, int timeoutSeconds, String bodyMode, String errorTypeName)Execute an HTTP request asynchronously. |
Constructor accepting a pre-configured HttpBuilder instance. Used by the create(Closure) factory for advanced configuration.
Execute an HTTP request synchronously.
method - HTTP method (GET, POST, PUT, DELETE, PATCH)urlTemplate - URL template with {param} placeholdersreturnTypeName - the method's return type name for response conversionpathParams - map of path parameter names to valuesqueryParams - map of query parameter names to valuesheaders - map of additional headers for this requestbody - request body (serialized as JSON if non-null)Execute an HTTP request asynchronously.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.