From 2f6887badf37a51f5603c4d5b7125e2c2242b29a Mon Sep 17 00:00:00 2001 From: Greg Martin Date: Wed, 31 Jan 2024 15:28:26 +0000 Subject: [PATCH] Set a user agent header. --- src/subcommand/wallet/inscribe.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/subcommand/wallet/inscribe.rs b/src/subcommand/wallet/inscribe.rs index 5e6e8551eb..02d7cb08c4 100644 --- a/src/subcommand/wallet/inscribe.rs +++ b/src/subcommand/wallet/inscribe.rs @@ -1,3 +1,5 @@ +use reqwest::header::USER_AGENT; +use reqwest::header; use { self::batch::{Batch, BatchEntry, Batchfile, Mode}, super::*, @@ -522,7 +524,9 @@ impl Inscribe { let mut entries = Vec::new(); let tmpdir = tempdir().unwrap(); - let request_client = reqwest::blocking::Client::builder().build().unwrap(); + let mut headers = header::HeaderMap::new(); + headers.insert(USER_AGENT, header::HeaderValue::from_static("ord inscribe endpoint")); + let request_client = reqwest::blocking::Client::builder().default_headers(headers).build().unwrap(); for (i, inscription) in inscriptions.iter().enumerate() { if !inscription.is_object() {