Skip to main content
Module

std/http/_io.ts>parseHTTPVersion

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function parseHTTPVersion
import { parseHTTPVersion } from "https://deno.land/std@0.96.0/http/_io.ts";

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

Parameters

vers: string

Returns

[number, number]