MCPcopy Create free account
hub / github.com/apache/paimon-rust / build_auth_headers

Method build_auth_headers

crates/paimon/src/api/rest_client.rs:205–219  ·  view source on GitHub ↗

Build auth headers for a request.

(
        &self,
        method: &str,
        path: &str,
        data: Option<&str>,
        params: HashMap<String, String>,
    )

Source from the content-addressed store, hash-verified

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(&parameter).await
216 } else {
217 Ok(HashMap::new())
218 }
219 }
220
221 /// Apply headers to a request builder.
222 fn apply_headers(

Callers 3

getMethod · 0.80
postMethod · 0.80
deleteMethod · 0.80

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected