You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For streaming endpoints, use `streamingApiExecutor` instead. Pass the response class directly — the SDK handles the rest. It delivers each response object to a consumer callback as it arrives, and returns a `CompletableFuture<Void>` that completes when the stream is exhausted.
- Path/query parameters are URL-encoded automatically
149
215
- Authentication tokens injected from client config
150
216
-`{store_id}` auto-replaced if not provided via `.pathParam()`
217
+
- For `StreamingApiExecutor`, pass the response class directly (`MyResponse.class`). The SDK builds the required Jackson type internally. Use the `TypeReference` overload only when `T` is itself a generic type.
151
218
152
219
## Migration to Typed Methods
153
220
154
-
When SDK adds typed methods for an endpoint, you can migrate from API Executor:
221
+
When the SDK adds typed methods for an endpoint, you can migrate from API Executor:
Copy file name to clipboardExpand all lines: examples/README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,10 @@ A simple example that creates a store, runs a set of calls against it including
13
13
#### Streaming Examples
14
14
-`streamed-list-objects/` - Demonstrates using the StreamedListObjects API to retrieve large result sets without pagination limits
15
15
16
-
#### API Executor Examples
17
-
-`api-executor/` - Demonstrates direct HTTP access to OpenFGA endpoints not yet wrapped by the SDK, maintaining SDKconfiguration (authentication, retries, error handling)
16
+
#### API Executor Examples (`api-executor/`)
17
+
Demonstrates direct HTTP access to OpenFGA endpoints not yet wrapped by the SDK. Standard requests go through the SDK's full configuration (authentication, retries, error handling, telemetry). Streaming requests use direct HTTP streaming — authentication is applied but retries and telemetry are not.
18
18
19
+
-**`ApiExecutorExample.java`** — standard (non-streaming) endpoints: typed responses, raw JSON, query parameters, custom headers, error handling
20
+
-**`StreamingApiExecutorExample.java`** — streaming endpoints: calls `streamed-list-objects` via `client.streamingApiExecutor(StreamedListObjectsResponse.class).stream(request, consumer)`, demonstrating per-object callbacks and error handling
21
+
22
+
Run with `make run` (standard) or `make run-streaming` (streaming) from the `api-executor/` directory.
0 commit comments