mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 05:00:59 +03:00
Fix http headers
This commit is contained in:
parent
180bd99ddf
commit
fe856e2cb9
@ -287,7 +287,7 @@ fn handle_broadcast<N: Network>(endpoint: &String, transaction: Transaction<N>,
|
||||
.redirects(0)
|
||||
.build()
|
||||
.post(endpoint)
|
||||
.set(&format!("X-Aleo-Leo-{}", env!("CARGO_PKG_VERSION")), "true")
|
||||
.set("X-Leo-Version", env!("CARGO_PKG_VERSION"))
|
||||
.send_json(&transaction)
|
||||
.map_err(|err| CliError::broadcast_error(err.to_string()))?;
|
||||
match response.status() {
|
||||
|
@ -523,7 +523,7 @@ pub fn fetch_from_network(url: &str) -> Result<String, UtilError> {
|
||||
.redirects(0)
|
||||
.build()
|
||||
.get(url)
|
||||
.set(&format!("X-Aleo-Leo-{}", env!("CARGO_PKG_VERSION")), "true")
|
||||
.set("X-Leo-Version", env!("CARGO_PKG_VERSION"))
|
||||
.call()
|
||||
.map_err(|err| UtilError::failed_to_retrieve_from_endpoint(err, Default::default()))?;
|
||||
match response.status() {
|
||||
|
Loading…
Reference in New Issue
Block a user