Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/std/http/mod.ts>parseHTTPVersion

A modern runtime for JavaScript and TypeScript.
Go to Latest
function parseHTTPVersion
import { parseHTTPVersion } from "https://deno.land/x/deno@v0.28.0/std/http/mod.ts";

ParseHTTPVersion parses a HTTP version string. "HTTP/1.0" returns (1, 0, true). Ported from https://github.com/golang/go/blob/f5c43b9/src/net/http/request.go#L766-L792

Parameters

vers: string

Returns

[number, number]