pub struct JobRequest {
pub method: String,
pub url: Option<String>,
pub url_from: Option<String>,
pub headers: HashMap<String, String>,
pub query: HashMap<String, String>,
pub json: Option<Value>,
pub locator_header: Option<String>,
pub locator_body: Option<String>,
pub locator_param: Option<String>,
pub records_path: Option<String>,
}Expand description
One HTTP request in a job lifecycle (submit / fetch).
Fields§
§method: StringHTTP method (default GET; set POST for submit).
url: Option<String>URL — absolute, or a base_url-relative path. ${job_id} is substituted.
Required for submit. For fetch, set exactly one of url (a fixed
template) or url_from (a JSONPath into the poll body).
url_from: Option<String>fetch only (#543): resolve the download URL from the last poll
response body via JSONPath, instead of rendering url.
For APIs that return a one-time signed download link in the poll body
(e.g. a Stripe report run’s result.url) rather than at a deterministic
/{job_id} path. The matched value must be a string; an absolute URL is
used verbatim, a relative one is resolved against base_url. Mutually
exclusive with url.
headers: HashMap<String, String>Extra headers.
query: HashMap<String, String>Extra query params.
json: Option<Value>JSON request body.
locator_header: Option<String>fetch only (#557): result-set continuation. Response header carrying a
pagination locator (e.g. Salesforce Bulk Sforce-Locator). While present
(and not empty / "null"), the fetch is repeated with the locator sent as
locator_param, appending records across pages.
locator_body: Option<String>fetch only (#557): JSONPath into the fetch response body for the
continuation locator, when it rides the body rather than a header.
Alternative to locator_header.
locator_param: Option<String>fetch only (#557): query-param name the locator is sent as on each
continuation request. Required when a locator source is configured.
records_path: Option<String>fetch only (#557): JSONPath for extracting records from each fetch page,
overriding the source-level records_path. Applies to a JSON result body.
Trait Implementations§
Source§impl Clone for JobRequest
impl Clone for JobRequest
Source§fn clone(&self) -> JobRequest
fn clone(&self) -> JobRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JobRequest
impl Debug for JobRequest
Source§impl<'de> Deserialize<'de> for JobRequest
impl<'de> Deserialize<'de> for JobRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for JobRequest
impl JsonSchema for JobRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more