change Authorization to authorization because wtf notebrook yo

This commit is contained in:
2026-01-10 11:20:30 +00:00
parent 81022c4e21
commit 9ea94e0e31

View File

@@ -2,7 +2,7 @@
//! Provides functions to list channels, read messages, and send messages by channel name //! Provides functions to list channels, read messages, and send messages by channel name
use reqwest::blocking::Client; use reqwest::blocking::Client;
use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION, CONTENT_TYPE}; use reqwest::header::{HeaderMap, HeaderName, HeaderValue, CONTENT_TYPE};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use thiserror::Error; use thiserror::Error;
@@ -55,7 +55,7 @@ impl ChannelClient {
pub fn new(url: &str, token: &str) -> Result<Self, ChannelError> { pub fn new(url: &str, token: &str) -> Result<Self, ChannelError> {
let mut headers = HeaderMap::new(); let mut headers = HeaderMap::new();
headers.insert( headers.insert(
AUTHORIZATION, HeaderName::from_static("authorization"),
HeaderValue::from_str(&format!("Bearer {}", token)) HeaderValue::from_str(&format!("Bearer {}", token))
.map_err(|_| ChannelError::InvalidHeader)?, .map_err(|_| ChannelError::InvalidHeader)?,
); );