pub struct RequestOptions {
pub method: String,
pub target: RequestTarget,
pub headers: Vec<String>,
pub data: String,
pub auth_type: String,
pub username: String,
pub no_auth: bool,
pub verbose: bool,
pub trace: bool,
pub pagination_token: String,
}Expand description
Common options for API requests.
Threaded into ApiClient::send_request, ApiClient::send_multipart_request,
and ApiClient::stream_request; carries everything those calls need
beyond the client itself.
Fields§
§method: StringHTTP method ("GET", "POST", etc). Empty defaults to "GET".
target: RequestTargetTyped request target — either a path template or a raw URL.
headers: Vec<String>Extra HTTP headers in "Name: Value" form.
data: StringRequest body. JSON-shaped strings are sent as application/json;
otherwise as application/x-www-form-urlencoded.
auth_type: StringExplicit auth scheme — "oauth1", "oauth2", "app", or empty for
auto-detect against the endpoint’s accepted set.
username: StringOAuth2 username for the active app. Empty selects the active app’s first stored OAuth2 token.
no_auth: boolSkip auth-header attachment entirely. Used for unauthenticated probes.
verbose: boolEmit verbose request / response diagnostics through the client’s
OutputConfig.
trace: boolEmit the X-B3-Flags: 1 header to flag the request for upstream tracing.
pagination_token: StringCursor / pagination_token query parameter for list endpoints.
Threaded in from the global --cursor / --after flag (or
XURL_CURSOR / XURL_AFTER env vars). List shortcuts append it to
the URL when non-empty; non-paginated endpoints ignore it.
Trait Implementations§
Source§impl Clone for RequestOptions
impl Clone for RequestOptions
Source§fn clone(&self) -> RequestOptions
fn clone(&self) -> RequestOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more