Module Fetch.Method

type standard = [
| `CONNECT
| `DELETE
| `GET
| `HEAD
| `OPTIONS
| `POST
| `PUT
| `TRACE
]
type t = [
| standard
| `Other of string
]
val ofString : string -> t

Returns a t from a string.

Examples

Method.ofString("GET") = `GET
Method.ofString("NOT_A_STANDARD_METHOD") = `Other("NOT_A_STANDARD_METHOD")
val toString : t -> string

Returns the string-representation of a t.

Examples

Method.toString(`GET) = "GET"
Method.toString(`Other("NOT_A_STANDARD_METHOD") = "NOT_A_STANDARD_METHOD"