FormPart

is a single part decoded from a multipart/form-data body: the field name, an optional filename (present for file uploads), an optional content-type, and the raw body.

body

instantiate

(Fn [(Ref FormPart a)] (Ref String a))

gets the body property of a FormPart.

content-type

instantiate

(Fn [(Ref FormPart a)] (Ref (Maybe String) a))

gets the content-type property of a FormPart.

copy

instantiate

(Fn [(Ref FormPart a)] FormPart)

copies a FormPart.

delete

instantiate

(Fn [FormPart] ())

deletes a FormPart. Should usually not be called manually.

filename

instantiate

(Fn [(Ref FormPart a)] (Ref (Maybe String) a))

gets the filename property of a FormPart.

init

instantiate

(Fn [String, (Maybe String), (Maybe String), String] FormPart)

creates a FormPart.

name

instantiate

(Fn [(Ref FormPart a)] (Ref String a))

gets the name property of a FormPart.

prn

instantiate

(Fn [(Ref FormPart a)] String)

converts a FormPart to a string.

set-body

instantiate

(Fn [FormPart, String] FormPart)

sets the body property of a FormPart.

set-body!

instantiate

(Fn [(Ref FormPart a), String] ())

sets the body property of a FormPart in place.

set-content-type

instantiate

(Fn [FormPart, (Maybe String)] FormPart)

sets the content-type property of a FormPart.

set-content-type!

instantiate

(Fn [(Ref FormPart a), (Maybe String)] ())

sets the content-type property of a FormPart in place.

set-filename

instantiate

(Fn [FormPart, (Maybe String)] FormPart)

sets the filename property of a FormPart.

set-filename!

instantiate

(Fn [(Ref FormPart a), (Maybe String)] ())

sets the filename property of a FormPart in place.

set-name

instantiate

(Fn [FormPart, String] FormPart)

sets the name property of a FormPart.

set-name!

instantiate

(Fn [(Ref FormPart a), String] ())

sets the name property of a FormPart in place.

str

instantiate

(Fn [(Ref FormPart a)] String)

converts a FormPart to a string.

update-body

instantiate

(Fn [FormPart, (Ref (Fn [String] String a) b)] FormPart)

updates the body property of a FormPart using a function f.

update-content-type

instantiate

(Fn [FormPart, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] FormPart)

updates the content-type property of a FormPart using a function f.

update-filename

instantiate

(Fn [FormPart, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] FormPart)

updates the filename property of a FormPart using a function f.

update-name

instantiate

(Fn [FormPart, (Ref (Fn [String] String a) b)] FormPart)

updates the name property of a FormPart using a function f.