Net.HTTP.Token

lib/Net/HTTP/Token.gob

A token (RFC 9110 ยง5.6.2): one or more of the bytes HTTP allows in a name, the letters, digits and !#$%&'*+-.^_`|~. Method names, media types, authentication schemes and parameter names are tokens.

A token keeps its case: method names are case-sensitive, so get is not GET. The places where case does not matter lowercase their own tokens.

type Token
fun parse : fun(String) -> Option Token
fun literal : fun(String) -> Token

Returns s as a token, and panics if it is not one: a token written in the program's source that is not one is a mistake in the program.

fun toString : fun(Token) -> String
instance Show Token