gossamer/form_data

Types

pub type FormData

Values

pub fn append(
  to form_data: FormData,
  name name: String,
  value value: String,
) -> FormData

Appends a new value onto an existing key, or adds the key if it does not already exist. Mutates the form data in-place and returns it for chaining.

pub fn append_blob(
  to form_data: FormData,
  name name: String,
  value value: blob.Blob,
) -> FormData

Appends a blob value. Mutates the form data in-place and returns it for chaining.

pub fn append_blob_with_filename(
  to form_data: FormData,
  name name: String,
  value value: blob.Blob,
  named filename: String,
) -> FormData

Appends a blob value with a filename. Mutates the form data in-place and returns it for chaining.

pub fn delete(
  from form_data: FormData,
  name name: String,
) -> FormData

Deletes a key and all its values. Mutates the form data in-place and returns it for chaining.

pub fn entries(of form_data: FormData) -> List(#(String, String))
pub fn for_each(
  in form_data: FormData,
  run callback: fn(String, String) -> a,
) -> Nil
pub fn get(
  from form_data: FormData,
  name name: String,
) -> Result(String, Nil)
pub fn get_all(
  from form_data: FormData,
  name name: String,
) -> List(String)
pub fn get_all_files(
  from form_data: FormData,
  name name: String,
) -> List(file.File)
pub fn get_file(
  from form_data: FormData,
  name name: String,
) -> Result(file.File, Nil)
pub fn has(in form_data: FormData, name name: String) -> Bool
pub fn keys(of form_data: FormData) -> List(String)
pub fn new() -> FormData
pub fn set(
  in form_data: FormData,
  name name: String,
  value value: String,
) -> FormData

Sets a new value for an existing key, or adds the key if it does not already exist. Mutates the form data in-place and returns it for chaining.

pub fn set_blob(
  in form_data: FormData,
  name name: String,
  value value: blob.Blob,
) -> FormData

Sets a blob value. Mutates the form data in-place and returns it for chaining.

pub fn set_blob_with_filename(
  in form_data: FormData,
  name name: String,
  value value: blob.Blob,
  named filename: String,
) -> FormData

Sets a blob value with a filename. Mutates the form data in-place and returns it for chaining.

pub fn values(of form_data: FormData) -> List(String)
Search Document