mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-24 03:03:09 +00:00
22 lines
625 B
Rust
22 lines
625 B
Rust
use anyhow::Result;
|
|
use common_http_client::CommonHttpClient;
|
|
pub use common_http_client::{BasicAuthCredentials, Error};
|
|
use reqwest::Client;
|
|
|
|
// Simple wrapper
|
|
// maybe extend in the future for our purposes
|
|
pub struct BedrockClient(pub CommonHttpClient);
|
|
|
|
impl BedrockClient {
|
|
pub fn new(auth: Option<BasicAuthCredentials>) -> Result<Self> {
|
|
let client = Client::builder()
|
|
//Add more fiedls if needed
|
|
.timeout(std::time::Duration::from_secs(60))
|
|
.build()?;
|
|
|
|
Ok(BedrockClient(CommonHttpClient::new_with_client(
|
|
client, auth,
|
|
)))
|
|
}
|
|
}
|