pub enum TransportMethod {
Get,
Post,
PostJson(String),
PostXml(String),
PostForm(Vec<(String, String)>),
}Expand description
传输方法与内联载荷。
PostJson / PostXml / PostForm 携带各自载荷并隐含对应 Content-Type
(application/json / text/xml / 表单编码),与 Java 各执行器
(SimplePostRequestExecutor 等)的请求语义对齐。
Variants§
Get
HTTP GET
Post
HTTP POST(体由 TransportBody 提供)
PostJson(String)
POST JSON 字符串(Content-Type: application/json)
PostXml(String)
POST XML 字符串(Content-Type: text/xml)
PostForm(Vec<(String, String)>)
POST 表单(application/x-www-form-urlencoded)
Trait Implementations§
Source§impl Clone for TransportMethod
impl Clone for TransportMethod
Source§fn clone(&self) -> TransportMethod
fn clone(&self) -> TransportMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransportMethod
impl Debug for TransportMethod
impl Eq for TransportMethod
Source§impl PartialEq for TransportMethod
impl PartialEq for TransportMethod
impl StructuralPartialEq for TransportMethod
Auto Trait Implementations§
impl Freeze for TransportMethod
impl RefUnwindSafe for TransportMethod
impl Send for TransportMethod
impl Sync for TransportMethod
impl Unpin for TransportMethod
impl UnsafeUnpin for TransportMethod
impl UnwindSafe for TransportMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.