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