fn request_headers(&self) -> Result<HeaderMap, ApiError> {
        let mut map = HeaderMap::new();
        map.insert(header::ACCEPT, HeaderValue::from_static("application/json"));
        map.insert(
            header::CONTENT_TYPE,
            HeaderValue::from_static("application/json"),
        );
        map.insert(
            header::AUTHORIZATION,
            HeaderValue::from_str(&format!(
                "Bearer {}",
                self.auth_token.as_ref().ok_or(ApiError::MissingAuthToken)?
            ))?,
        );
        Ok(map)
    }
/// Headers for interacting with the API.
Headers for interacting with the API.
Headers for interacting with the API .
fn request_headers(&self) -> Result<HeaderMap, ApiError> {
        let mut map = HeaderMap::new();
        map.insert(header::ACCEPT, HeaderValue::from_static("application/json"));
        map.insert(
            header::CONTENT_TYPE,
            HeaderValue::from_static("application/json"),
        );
        map.insert(
            header::AUTHORIZATION,
            HeaderValue::from_str(&format!(
                "Bearer {}",
                self.auth_token.as_ref().ok_or(ApiError::MissingAuthToken)?
            ))?,
        );
        Ok(map)
    }
fn request_headers ( & self ) -> Result < HeaderMap , ApiError > { let mut map = HeaderMap :: new ( ) ; map . insert ( header :: ACCEPT , HeaderValue :: from_static ( " " ) ) ; map . insert ( header :: CONTENT_TYPE , HeaderValue :: from_static ( " " ) , ) ; map . insert ( header :: AUTHORIZATION , HeaderValue :: from_str ( & format ! ( " " self auth_token as_ref ( ) ok_or ( ApiError MissingAuthToken ) ) ) ? , ) ; Ok ( map ) }
Headers for interacting with the API.
Headers for interacting with the API .
&self
&self