Struct worker_plus::FormData
source · pub struct FormData(_);
Expand description
A FormData representation of the request body, providing access to form encoded fields and files.
Implementations§
source§impl FormData
impl FormData
pub fn new() -> Self
sourcepub fn get(&self, name: &str) -> Option<FormEntry>
pub fn get(&self, name: &str) -> Option<FormEntry>
Returns the first value associated with a given key from within a FormData
object.
sourcepub fn get_all(&self, name: &str) -> Option<Vec<FormEntry>>
pub fn get_all(&self, name: &str) -> Option<Vec<FormEntry>>
Returns a vec of all the values associated with a given key from within a FormData
object.
sourcepub fn has(&self, name: &str) -> bool
pub fn has(&self, name: &str) -> bool
Returns a boolean stating whether a FormData
object contains a certain key.
sourcepub fn append(&mut self, name: &str, value: &str) -> Result<()>
pub fn append(&mut self, name: &str, value: &str) -> Result<()>
Appends a new value onto an existing key inside a FormData
object, or adds the key if it
does not already exist.