Prajna


HttpBuilderHelper

Helper function to form a properly formatted HTTP page

Functions and values

Function or valueDescription
FormLink link s sb
Signature: link:(StringBuilder -> StringBuilder) -> s:(StringBuilder -> StringBuilder) -> sb:StringBuilder -> StringBuilder

Append a properly formatted HTML link to a HTML page. Function link(sb) appends href link, and function s(sb) appends link text.

WrapImageURI (...)
Signature: width:int -> height:int -> uri:string -> alt_text:string -> sb:StringBuilder -> StringBuilder

Append an image with URL to HTML paragraph, with width and height defined the size of included image, uri locates the image link, and al_text is the alternative text of the image.

WrapParagraph info sb
Signature: info:(StringBuilder -> StringBuilder) -> sb:StringBuilder -> StringBuilder

Append a properly formatted HTML paragraph, with function info(sb) appends paragraph text.

WrapParagraphWithID id info sb
Signature: id:(StringBuilder -> StringBuilder) -> info:(StringBuilder -> StringBuilder) -> sb:StringBuilder -> StringBuilder

Append a properly formatted HTML paragraph with ID, function id(sb) appends ID string, and function info(sb) appends paragraph text.

WrapRaw txt sb
Signature: txt:string -> sb:StringBuilder -> StringBuilder

Append a properly formatted HTML string to a HTML page

WrapTableItem s sb
Signature: s:(StringBuilder -> StringBuilder) -> sb:StringBuilder -> StringBuilder

Append a table column to Http page, where function s(sb) generates a HTML table column

WrapTableRow s sb
Signature: s:(StringBuilder -> StringBuilder) -> sb:StringBuilder -> StringBuilder

Append a table row to Http page, where function s(sb) generates a HTML table row

Fork me on GitHub