Fix http headers

This commit is contained in:
Pranav Gaddamadugu 2024-11-06 13:50:16 -08:00
parent 180bd99ddf
commit fe856e2cb9
2 changed files with 2 additions and 2 deletions

View File

@ -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() {

View File

@ -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() {