Trait qiniu_sdk::prelude::SimplifiedCallbackContext
source · pub trait SimplifiedCallbackContext: Sync + Send + Debug {
fn use_https(&self) -> bool;
fn method(&self) -> &Method;
fn version(&self) -> Version;
fn path(&self) -> &str;
fn query(&self) -> &str;
fn query_pairs(&self) -> &[(Cow<'_, str>, Cow<'_, str>)];
fn headers(&self) -> &HeaderMap<HeaderValue>;
fn appended_user_agent(&self) -> &UserAgent;
fn authorization(&self) -> Option<&Authorization<'_>>;
fn idempotent(&self) -> Idempotent;
}
Expand description
简化回调函数上下文
用于在回调函数中获取请求相关信息,如请求路径、请求方法、查询参数、请求头等。
Required Methods
sourcefn headers(&self) -> &HeaderMap<HeaderValue>
fn headers(&self) -> &HeaderMap<HeaderValue>
获取请求 HTTP Headers
sourcefn appended_user_agent(&self) -> &UserAgent
fn appended_user_agent(&self) -> &UserAgent
获取追加的 UserAgent
获取七牛鉴权签名
sourcefn idempotent(&self) -> Idempotent
fn idempotent(&self) -> Idempotent
获取请求幂等性