// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
/**
 * Provides user-friendly {@linkcode serve} on top of Deno's native HTTP server
 * and other utilities for creating HTTP servers and clients.
 *
 * ## File Server
 *
 * A small program for serving local files over HTTP.
 *
 * ```sh
 * deno run --allow-net --allow-read --allow-sys jsr:@std/http/file-server
 * > HTTP server listening on http://localhost:4507/
 * ```
 *
 * ## HTTP Status Code and Status Text
 *
 * Helper for processing status code and status text.
 *
 * ## HTTP errors
 *
 * Provides error classes for each HTTP error status code as well as utility
 * functions for handling HTTP errors in a structured way.
 *
 * ## Methods
 *
 * Provides helper functions and types to work with HTTP method strings safely.
 *
 * ## Negotiation
 *
 * A set of functions which can be used to negotiate content types, encodings and
 * languages when responding to requests.
 *
 * > Note: some libraries include accept charset functionality by analyzing the
 * > `Accept-Charset` header. This is a legacy header that
 * > {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset | clients omit and servers should ignore}
 * > therefore is not provided.
 *
 * ## Cookie maps
 *
 * An alternative to `cookie.ts` is `cookie_map.ts` which provides `CookieMap`,
 * `SecureCookieMap`, and `mergeHeaders` to manage request and response cookies
 * with the familiar `Map` interface.
 *
 * ## User agent handling
 *
 * The {@linkcode UserAgent} class provides user agent string parsing, allowing
 * a user agent flag to be semantically understood.
 *
 * For example to integrate the user agent provided in the header `User-Agent`
 * in an http request would look like this:
 *
 * ```ts no-eval
 * import { UserAgent } from "@std/http/user-agent";
 *
 * Deno.serve((req) => {
 *   const userAgent = new UserAgent(req.headers.get("user-agent") ?? "");
 *   return new Response(`Hello, ${userAgent.browser.name}
 *     on ${userAgent.os.name} ${userAgent.os.version}!`);
 * });
 * ```
 *
 * @module
 */

export * from "./cookie.ts";
export * from "./etag.ts";
export * from "./status.ts";
export * from "./negotiation.ts";
export * from "./server.ts";
export * from "./unstable_signed_cookie.ts";
export * from "./server_sent_event_stream.ts";
export * from "./user_agent.ts";
export * from "./file_server.ts";

// denoCacheMetadata={"headers":{"etag":"\"fabab70b9d0d6f4daa0a73e25eb72e07\"","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","cf-cache-status":"HIT","x-jsr-backend":"modules","server":"cloudflare","cf-ray":"a223e6564e9c7db6-LAX","access-control-allow-origin":"*","cache-control":"public, max-age=31536000, immutable","vary":"Origin","date":"Tue, 28 Jul 2026 12:31:14 GMT","content-type":"text/typescript","accept-ranges":"bytes","age":"126790","access-control-expose-headers":"*","cross-origin-resource-policy":"cross-origin","x-content-type-options":"nosniff","x-robots-tag":"noindex","set-cookie":"__cf_bm=01JGAv8ohlmQhbZoQMzXVVCThZk3BTFzqE3oUaHxZRE-1785241874.9352434-1.0.1.1-E9he6eWL.4Kx9nE5f9ulqU44FrVXfyKFsQvmWxCudoKFqMCtBckkL9LDddYsi0_QdhsZQnhJ0a0F67I2c4dRjCpMmXWmEk8qGz.HOr_y5oGohmF9ULBoTbngNEvqh7ls; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:14 GMT","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=8WchX8tkstEw4Q3uleb2rDLzEC1%2BZjRE95Vei3%2BnAFRnfZMj9FhH9XwjGVCnTkMWbGdkGPItQDnKegaW8DgdiNZznCZj4oIv76NN9jzdU6tR%2BSd1ouQ8CDQ%3D\"}]}","content-length":"2400","alt-svc":"h3=\":443\"; ma=86400"},"url":"https://jsr.io/@std/http/0.224.5/mod.ts","time":1785241874}