Package ai.webscraping
Class Config
java.lang.Object
ai.webscraping.Config
Immutable configuration for a
Client.
Build with builder() or use fromEnvironment() to pick up
the API key from the WEBSCRAPING_AI_API_KEY environment variable.
Request timeout is the fallback per-request
deadline used by the default transport. Pass a non-positive Duration
to disable the implicit timeout entirely (callers manage it themselves).
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEnvironment variable consulted whenConfig.Builder.apiKey(String)is not set.static final StringProduction API base URL.static final DurationDefault fallback per-request timeout (60 seconds). -
Method Summary
Modifier and TypeMethodDescriptionstatic Config.Builderbuilder()static ConfigConvenience constructor — reads the API key from the env var only.
-
Field Details
-
DEFAULT_BASE_URL
Production API base URL.- See Also:
-
DEFAULT_REQUEST_TIMEOUT
Default fallback per-request timeout (60 seconds). -
API_KEY_ENV
Environment variable consulted whenConfig.Builder.apiKey(String)is not set.- See Also:
-
-
Method Details
-
builder
-
fromEnvironment
Convenience constructor — reads the API key from the env var only. -
getApiKey
-
getBaseUrl
-
getRequestTimeout
-
getTransport
-
getUserAgent
-