Build auth headers for a request.
(
&self,
method: &str,
path: &str,
data: Option<&str>,
params: HashMap<String, String>,
)
| 203 | |
| 204 | /// Build auth headers for a request. |
| 205 | async fn build_auth_headers( |
| 206 | &self, |
| 207 | method: &str, |
| 208 | path: &str, |
| 209 | data: Option<&str>, |
| 210 | params: HashMap<String, String>, |
| 211 | ) -> Result<HashMap<String, String>> { |
| 212 | if let Some(ref auth_fn) = self.auth_function { |
| 213 | let parameter = |
| 214 | RESTAuthParameter::new(method, path, data.map(|s| s.to_string()), params); |
| 215 | auth_fn.apply(¶meter).await |
| 216 | } else { |
| 217 | Ok(HashMap::new()) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /// Apply headers to a request builder. |
| 222 | fn apply_headers( |