17
Cargo.lock
generated
17
Cargo.lock
generated
@@ -1269,7 +1269,7 @@ checksum = "bf3c1f5cd8dfe2ade470a218696c66cf556fcfd701e7830fa2e9f4428292a2a1"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"egui",
|
||||
"ehttp 0.5.0",
|
||||
"ehttp",
|
||||
"enum-map",
|
||||
"image",
|
||||
"log",
|
||||
@@ -1326,19 +1326,6 @@ dependencies = [
|
||||
"web-time 1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ehttp"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80b69a6f9168b96c0ae04763bec27a8b06b34343c334dd2703a4ec21f0f5e110"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"ureq",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ehttp"
|
||||
version = "0.5.0"
|
||||
@@ -2809,7 +2796,7 @@ dependencies = [
|
||||
"egui_nav",
|
||||
"egui_tabs",
|
||||
"egui_virtual_list",
|
||||
"ehttp 0.2.0",
|
||||
"ehttp",
|
||||
"enostr",
|
||||
"hex",
|
||||
"image",
|
||||
|
||||
@@ -21,7 +21,7 @@ egui_extras = { version = "0.29.1", features = ["all_loaders"] }
|
||||
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "ac7d663307b76634757024b438dd4b899790da99" }
|
||||
egui_tabs = "0.2.0"
|
||||
egui_virtual_list = "0.5.0"
|
||||
ehttp = "0.2.0"
|
||||
ehttp = "0.5.0"
|
||||
enostr = { path = "crates/enostr" }
|
||||
ewebsock = { version = "0.2.0", features = ["tls"] }
|
||||
hex = "0.4.3"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::{collections::BTreeMap, path::PathBuf};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use base64::{prelude::BASE64_URL_SAFE, Engine};
|
||||
use ehttp::Request;
|
||||
@@ -104,15 +104,13 @@ fn create_nip96_request(
|
||||
body.extend(file_contents);
|
||||
body.extend(format!("\r\n--{}--\r\n", boundary).as_bytes());
|
||||
|
||||
let headers = {
|
||||
let mut map = BTreeMap::new();
|
||||
map.insert(
|
||||
"Content-Type".to_owned(),
|
||||
format!("multipart/form-data; boundary={boundary}"),
|
||||
);
|
||||
map.insert("Authorization".to_owned(), format!("Nostr {nip98_base64}"));
|
||||
map
|
||||
};
|
||||
let headers = ehttp::Headers::new(&[
|
||||
(
|
||||
"Content-Type",
|
||||
format!("multipart/form-data; boundary={boundary}").as_str(),
|
||||
),
|
||||
("Authorization", format!("Nostr {nip98_base64}").as_str()),
|
||||
]);
|
||||
|
||||
Request {
|
||||
method: "POST".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user