2017-09-29

(sph web html)

_

import name

(sph web html)

exports

html-fold-multipart-form-data

procedure

signature

proc-part proc-multipart result port [boundary] ->

::

procedure:{alist:header procedure:fold-lines:{string:line any:result procedure:next:{any:result ->} ->} result -> any}

procedure:{header port result ->} any port [string]

->

any

----

proc-multipart is only called for multipart/mixed.

a functional parser for multipart-form-data that allows to stop after any cr-lf-terminated line or part and reads content stream-like via a reader procedure

and supports nested multipart/mixed data.

see also html-read-multipart-form-data

html-multipart-form-data-ref

procedure

signature

a name ->

list string -> pair

description

for parsed multipart form data like html-read-multipart-form-data creates.

retrieves (alist:header . string:body) pairs by content-disposition name

html-multipart-form-data?

procedure

signature

headers [header-key] ->

(string ...) [string] -> boolean

html-parse-urlencoded-form-data

procedure

signature

request-body ->

string -> alist

description

parse an application/x-www-form-urlencoded string and result in an alist

html-read-multipart-form-data

procedure

signature

port [normalise-header-keys?] ->

port [procedure:{string -> string/any}] -> list

description

parses all multipart form data available on port into a list.

for stream-like and conditional parsing see html-fold-multipart-form-data

html-uri-decode

procedure

signature

str ->

string -> string

html-uri-encode

procedure

signature

r ->

string -> string


tags: guile documentation library scheme sph-lib computer sph-web-html