Skip to content

Commit

Permalink
feat: make RequestBuilder::request public
Browse files Browse the repository at this point in the history
  • Loading branch information
Colerar committed Jan 20, 2023
1 parent 3459b89 commit a5424a9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/async_impl/request.rs
Expand Up @@ -177,6 +177,12 @@ impl RequestBuilder {
}
}

/// Get the request.
#[inline]
pub fn request(&self) -> &crate::Result<Request> {
&self.request
}

/// Add a `Header` to this Request.
pub fn header<K, V>(self, key: K, value: V) -> RequestBuilder
where
Expand Down
6 changes: 6 additions & 0 deletions src/blocking/request.rs
Expand Up @@ -167,6 +167,12 @@ impl RequestBuilder {
}
}

/// Get the request.
#[inline]
pub fn request(&self) -> &crate::Result<Request> {
&self.request
}

/// Add a `Header` to this Request.
///
/// ```rust
Expand Down
6 changes: 6 additions & 0 deletions src/wasm/request.rs
Expand Up @@ -115,6 +115,12 @@ impl RequestBuilder {
RequestBuilder { client, request }
}

/// Get the request.
#[inline]
pub fn request(&self) -> &Method {
&self.request
}

/// Modify the query string of the URL.
///
/// Modifies the URL of this request, adding the parameters provided.
Expand Down

0 comments on commit a5424a9

Please sign in to comment.