Skip to main content

@std/http@1.0.13
Built and signed on GitHub Actions

Utilities for building HTTP servers

This package works with DenoIt is unknown whether this package works with Bun
This package works with Deno
It is unknown whether this package works with Bun
JSR Score
94%
Published
2 months ago (1.0.13)

Contains the functions accepts, acceptsEncodings, and acceptsLanguages to provide content negotiation capabilities.

Functions

f
accepts

Returns an array of media types accepted by the request, in order of preference. If there are no media types supplied in the request, then any media type selector will be returned.

f
acceptsEncodings

Returns an array of content encodings accepted by the request, in order of preference. If there are no encoding supplied in the request, then ["*"] is returned, implying any encoding is accepted.

f
acceptsLanguages

Returns an array of languages accepted by the request, in order of preference. If there are no languages supplied in the request, then ["*"] is returned, imply any language is accepted.

Add Package

deno add jsr:@std/http

Import symbol

import * as mod from "@std/http/negotiation";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@std/http/negotiation";

Add Package

bunx jsr add @std/http

Import symbol

import * as mod from "@std/http/negotiation";