gossamer/form_data

Types

pub type FormData

Values

pub fn append(
  form_data: FormData,
  name: String,
  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(
  form_data: FormData,
  name: String,
  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(
  form_data: FormData,
  name: String,
  value: blob.Blob,
  filename: String,
) -> FormData

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

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

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

pub fn entries(form_data: FormData) -> List(#(String, String))
pub fn for_each(
  form_data: FormData,
  callback: fn(String, String) -> Nil,
) -> Nil
pub fn get(
  form_data: FormData,
  name: String,
) -> Result(String, Nil)
pub fn get_all(form_data: FormData, name: String) -> List(String)
pub fn get_all_files(
  form_data: FormData,
  name: String,
) -> List(file.File)
pub fn get_file(
  form_data: FormData,
  name: String,
) -> Result(file.File, Nil)
pub fn has(form_data: FormData, name: String) -> Bool
pub fn keys(form_data: FormData) -> List(String)
pub fn new() -> FormData
pub fn set(
  form_data: FormData,
  name: String,
  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(
  form_data: FormData,
  name: String,
  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(
  form_data: FormData,
  name: String,
  value: blob.Blob,
  filename: String,
) -> FormData

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

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