pub struct RequestBuilder { /* private fields */ }Expand description
RequestBuilder provides a mechanism for setting optional parameters on a request.
Each RequestBuilder parameter method call returns Self, so setting of multiple
parameters can be chained.
To finalize and submit the request, invoke .await, which
converts the RequestBuilder into a future,
executes the request and returns a Result with the parsed
response.
If you need lower-level access to the raw response details
(e.g. to inspect response headers or raw body data) then you
can finalize the request using the
RequestBuilder::send() method which returns a future
that resolves to a lower-level Response value.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn scope_path(self, scope_path: impl Into<String>) -> Self
pub fn scope_path(self, scope_path: impl Into<String>) -> Self
The path scope. The default is null.
Sourcepub fn recursion_level(self, recursion_level: impl Into<String>) -> Self
pub fn recursion_level(self, recursion_level: impl Into<String>) -> Self
The recursion level of this request. The default is ‘none’, no recursion.
Sourcepub fn include_content_metadata(self, include_content_metadata: bool) -> Self
pub fn include_content_metadata(self, include_content_metadata: bool) -> Self
Set to true to include content metadata. Default is false.
Sourcepub fn latest_processed_change(self, latest_processed_change: bool) -> Self
pub fn latest_processed_change(self, latest_processed_change: bool) -> Self
Set to true to include the latest changes. Default is false.
Sourcepub fn download(self, download: bool) -> Self
pub fn download(self, download: bool) -> Self
Set to true to download the response as a file. Default is false.
Sourcepub fn format(self, format: impl Into<String>) -> Self
pub fn format(self, format: impl Into<String>) -> Self
If specified, this overrides the HTTP Accept request header to return either ‘json’ or ‘zip’. If format is specified, then api-version should also be specified as a query parameter.
Sourcepub fn version_descriptor_version(
self,
version_descriptor_version: impl Into<String>,
) -> Self
pub fn version_descriptor_version( self, version_descriptor_version: impl Into<String>, ) -> Self
Version string identifier (name of tag/branch, SHA1 of commit)
Sourcepub fn version_descriptor_version_options(
self,
version_descriptor_version_options: impl Into<String>,
) -> Self
pub fn version_descriptor_version_options( self, version_descriptor_version_options: impl Into<String>, ) -> Self
Version options - Specify additional modifiers to version (e.g Previous)
Sourcepub fn version_descriptor_version_type(
self,
version_descriptor_version_type: impl Into<String>,
) -> Self
pub fn version_descriptor_version_type( self, version_descriptor_version_type: impl Into<String>, ) -> Self
Version type (branch, tag, or commit). Determines how Id is interpreted
Sourcepub fn include_content(self, include_content: bool) -> Self
pub fn include_content(self, include_content: bool) -> Self
Set to true to include item content when requesting json. Default is false.
Sourcepub fn resolve_lfs(self, resolve_lfs: bool) -> Self
pub fn resolve_lfs(self, resolve_lfs: bool) -> Self
Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
Sourcepub fn sanitize(self, sanitize: bool) -> Self
pub fn sanitize(self, sanitize: bool) -> Self
Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
Sourcepub fn send(self) -> BoxFuture<'static, Result<Response>>
pub fn send(self) -> BoxFuture<'static, Result<Response>>
Returns a future that sends the request and returns a Response object that provides low-level access to full response details.
You should typically use .await (which implicitly calls IntoFuture::into_future()) to finalize and send requests rather than send().
However, this function can provide more flexibility when required.
Trait Implementations§
Source§impl Clone for RequestBuilder
impl Clone for RequestBuilder
Source§fn clone(&self) -> RequestBuilder
fn clone(&self) -> RequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl IntoFuture for RequestBuilder
impl IntoFuture for RequestBuilder
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Returns a future that sends the request and returns the parsed response body.
You should not normally call this method directly, simply invoke .await which implicitly calls IntoFuture::into_future.
See IntoFuture documentation for more details.