Skip to main content
Module

x/https_status_codes/mod.ts>getStatusCode

A port of the http-status-codes npm library for deno.
Latest
function getStatusCode
import { getStatusCode } from "https://deno.land/x/https_status_codes@v1.2.0/mod.ts";

Returns the status code for the given reason phrase. If the given reason phrase does not exist, undefined is returned.

Parameters

reasonPhrase: string

The HTTP reason phrase (e.g. "Bad Request", "OK")

Returns

number

The associated status code