-
+
- + + Request + + +
- + + Response + + +
- + + Cookie + + +
- + + SameSite + + +
- + + HttpDate + + +
- + + Status + + +
- + + Form + + +
- + + Multipart + + +
- + + FormPart + + +
- + + BinaryPart + + +
- + + TransferEncoding + + +
- + + MediaType + + +
- + + Accept + + +
- + + MediaRange + + +
- + + AcceptEncoding + + +
- + + AcceptLanguage + + +
- + + Weighted + + +
- + + Auth + + +
- + + Credentials + + +
- + + ByteRange + + +
- + + ByteRangeSpec + + +
- + + ContentRange + + +
- + + ETag + + +
- + + ETagList + + +
- + + Precondition + + +
- + + CacheControl + + +
+ BinaryPart +
+is a single part decoded from a multipart/form-data body by
+Multipart.parse-bytes. It carries the same
+fields as a FormPart, but its body is an (Array Byte), so
+it survives the NUL bytes every binary upload contains.
+ body +
+ ++ (Fn [(Ref BinaryPart a)] (Ref (Array Byte) a)) +
+ + + ++
gets the body property of a BinaryPart.
+ content-type +
+ ++ (Fn [(Ref BinaryPart a)] (Ref (Maybe String) a)) +
+ + + ++
gets the content-type property of a BinaryPart.
+ copy +
+ ++ (Fn [(Ref BinaryPart a)] BinaryPart) +
+ + + ++
copies a BinaryPart.
+ delete +
+ ++ (Fn [BinaryPart] ()) +
+ + + ++
deletes a BinaryPart. Should usually not be called manually.
+ filename +
+ ++ (Fn [(Ref BinaryPart a)] (Ref (Maybe String) a)) +
+ + + ++
gets the filename property of a BinaryPart.
+ init +
+ ++ (Fn [String, (Maybe String), (Maybe String), (Array Byte)] BinaryPart) +
+ + + ++
creates a BinaryPart.
+ name +
+ ++ (Fn [(Ref BinaryPart a)] (Ref String a)) +
+ + + ++
gets the name property of a BinaryPart.
+ prn +
+ ++ (Fn [(Ref BinaryPart a)] String) +
+ + + ++
converts a BinaryPart to a string.
+ set-body +
+ ++ (Fn [BinaryPart, (Array Byte)] BinaryPart) +
+ + + ++
sets the body property of a BinaryPart.
+ set-body! +
+ ++ (Fn [(Ref BinaryPart a), (Array Byte)] ()) +
+ + + ++
sets the body property of a BinaryPart in place.
+ set-content-type +
+ ++ (Fn [BinaryPart, (Maybe String)] BinaryPart) +
+ + + ++
sets the content-type property of a BinaryPart.
+ set-content-type! +
+ ++ (Fn [(Ref BinaryPart a), (Maybe String)] ()) +
+ + + ++
sets the content-type property of a BinaryPart in place.
+ set-filename +
+ ++ (Fn [BinaryPart, (Maybe String)] BinaryPart) +
+ + + ++
sets the filename property of a BinaryPart.
+ set-filename! +
+ ++ (Fn [(Ref BinaryPart a), (Maybe String)] ()) +
+ + + ++
sets the filename property of a BinaryPart in place.
+ set-name +
+ ++ (Fn [BinaryPart, String] BinaryPart) +
+ + + ++
sets the name property of a BinaryPart.
+ set-name! +
+ ++ (Fn [(Ref BinaryPart a), String] ()) +
+ + + ++
sets the name property of a BinaryPart in place.
+ str +
+ ++ (Fn [(Ref BinaryPart a)] String) +
+ + + ++
converts a BinaryPart to a string.
+ to-form-part +
+ ++ (Fn [(Ref BinaryPart a)] FormPart) +
++ (to-form-part p) ++
+
converts a BinaryPart into a FormPart.
+The body becomes a String, and is therefore cut at its first NUL byte; only
+use this on parts you know are text.
+ update-body +
+ ++ (Fn [BinaryPart, (Ref (Fn [(Array Byte)] (Array Byte) a) b)] BinaryPart) +
+ + + ++
updates the body property of a BinaryPart using a function f.
+ update-content-type +
+ ++ (Fn [BinaryPart, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] BinaryPart) +
+ + + ++
updates the content-type property of a BinaryPart using a function f.
+ update-filename +
+ ++ (Fn [BinaryPart, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] BinaryPart) +
+ + + ++
updates the filename property of a BinaryPart using a function f.
+ update-name +
+ ++ (Fn [BinaryPart, (Ref (Fn [String] String a) b)] BinaryPart) +
+ + + ++
updates the name property of a BinaryPart using a function f.