feat(provider): expose url for http (#1550)
This commit is contained in:
parent
e2754dee4f
commit
555cbb16e6
|
@ -1345,6 +1345,18 @@ impl Provider<crate::Ipc> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Provider<HttpProvider> {
|
||||
/// The Url to which requests are made
|
||||
pub fn url(&self) -> &Url {
|
||||
self.inner.url()
|
||||
}
|
||||
|
||||
/// Mutable access to the Url to which requests are made
|
||||
pub fn url_mut(&mut self) -> &mut Url {
|
||||
self.inner.url_mut()
|
||||
}
|
||||
}
|
||||
|
||||
impl<Read, Write> Provider<RwClient<Read, Write>>
|
||||
where
|
||||
Read: JsonRpcClient + 'static,
|
||||
|
|
|
@ -115,6 +115,16 @@ impl Provider {
|
|||
Self::new_with_client(url, Client::new())
|
||||
}
|
||||
|
||||
/// The Url to which requests are made
|
||||
pub fn url(&self) -> &Url {
|
||||
&self.url
|
||||
}
|
||||
|
||||
/// Mutable access to the Url to which requests are made
|
||||
pub fn url_mut(&mut self) -> &mut Url {
|
||||
&mut self.url
|
||||
}
|
||||
|
||||
/// Initializes a new HTTP Client with authentication
|
||||
///
|
||||
/// # Example
|
||||
|
|
Loading…
Reference in New Issue