Skip to content

Commit bc3d431

Browse files
committed
feat: add way to make raw req and get url for BlockingClient
1 parent 6440e1d commit bc3d431

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/blocking.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ impl BlockingClient {
5151
}
5252
}
5353

54-
fn get_request(&self, path: &str) -> Result<Request, Error> {
54+
/// Get the underlying base URL.
55+
pub fn url(&self) -> &str {
56+
&self.url
57+
}
58+
59+
/// Perform a raw HTTP GET request with the given URI `path`.
60+
pub fn get_request(&self, path: &str) -> Result<Request, Error> {
5561
let mut request = minreq::get(format!("{}{}", self.url, path));
5662

5763
if let Some(proxy) = &self.proxy {

0 commit comments

Comments
 (0)