Module Fetch.Status
type informational=[|`Continue|`SwitchingProtocols|`Processing]type success=[|`OK|`Created|`Accepted|`NonAuthoritativeInformation|`NoContent|`ResetContent|`PartialContent|`MultiStatus|`AlreadyReported|`IMUsed]type redirection=[|`MultipleChoices|`MovedPermanently|`Found|`SeeOther|`NotModified|`UseProxy|`TemporaryRedirect|`PermanentRedirect]type clientError=[]type serverError=[]type standard=[|clientError|informational|redirection|serverError|success]type t=[|standard|`Other of int]
val toCode : t -> intReturns a code as an int from a t.
Examples
Status.toCode(`OK) = 200Status.toCode(`Other(999)) = 999
val ofCode : int -> tReturns a t from an int.
Examples
Status.ofCode(200) = `OKStatus.ofCode(999) = `Other(999)
val isInformational : t -> boolReturns true if the status is informational.
Examples
Status.isInformational(`Continue) = trueStatus.isInformational(`NotFound) = falseStatus.isInformational(`OK) = false
val isSuccessful : t -> boolReturns true if the status is successful.
Examples
Status.isSuccessful(`OK) = trueStatus.isSuccessful(`InternalServerError) = false
val isRedirect : t -> boolReturns true if the status is a redirect.
Examples
Status.isRedirect(`MovedPermanently) = trueStatus.isRedirect(`InternalServerError) = false
val isClientError : t -> boolReturns true if the status is that of a client error.
Examples
Status.isClientError(`NotFound) = trueStatus.isClientError(`InternalServerError) = falseStatus.isClientError(`OK) = false
val isServerError : t -> boolReturns true if the status is that of a server error.
Examples
Status.isServerError(`InternalServerError) = trueStatus.isServerError(`NotFound) = falseStatus.isServerError(`OK) = false
val isError : t -> boolReturns true if the status is an error, either of type client or server.
Examples
Status.isError(`InternalServerError) = trueStatus.isError(`NotFound) = trueStatus.isError(`OK) = false
val make : int -> t