Package io.getstream.services.framework
Class StreamRequest<T>
java.lang.Object
io.getstream.services.framework.StreamRequest<T>
-
Constructor Summary
ConstructorsConstructorDescriptionStreamRequest(StreamHTTPClient client, String method, String path, Object jRequest, Map<String, String> pathParams, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Preferred constructor: derives the transport, base URL, logger and log-bodies flag fromclient, so the request emits the SDK's structured log events.StreamRequest(okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper mapper, String baseURL, String method, String path, Object jRequest, Map<String, String> pathParams, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.HttpUrlOverride the per-call timeout for this single request.execute()Runs the request, retrying perretryConfig(opt-in, disabled by default — seeRetryConfig).
-
Constructor Details
-
StreamRequest
public StreamRequest(StreamHTTPClient client, String method, String path, Object jRequest, Map<String, String> pathParams, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws StreamExceptionPreferred constructor: derives the transport, base URL, logger and log-bodies flag fromclient, so the request emits the SDK's structured log events.- Throws:
StreamException
-
StreamRequest
public StreamRequest(okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper mapper, String baseURL, String method, String path, Object jRequest, Map<String, String> pathParams, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws StreamException- Throws:
StreamException
-
-
Method Details
-
buildUrl
public okhttp3.HttpUrl buildUrl(String baseUrl, String path, Map<String, String> pathParams, Object queryParams) throws com.fasterxml.jackson.core.JsonProcessingException, NullPointerException, IllegalAccessException- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionNullPointerExceptionIllegalAccessException
-
callTimeout
Override the per-call timeout for this single request. The override takes precedence over the client-wideRequestTimeoutconfigured viaStreamClientOptions.setRequestTimeout(java.time.Duration). Returnsthisfor chaining.Per CHA-2956.
-
execute
Runs the request, retrying perretryConfig(opt-in, disabled by default — seeRetryConfig). Only GET/HEAD requests failing with HTTP 429 (non-unrecoverable) or a transport error are retried; the last attempt's error is always what surfaces. Per CHA-2959.- Throws:
StreamException
-