mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
feat(http/unstable): headers
module (#4317)
* Added IANA headers * Apply suggestions from code review Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> * Cleaned up and added jsr support * Fixed linting * unstable notices --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
parent
a9f3558b85
commit
259ce6dfd2
@ -6,6 +6,7 @@
|
||||
"./cookie": "./cookie.ts",
|
||||
"./etag": "./etag.ts",
|
||||
"./file-server": "./file_server.ts",
|
||||
"./header": "./header.ts",
|
||||
"./method": "./method.ts",
|
||||
"./negotiation": "./negotiation.ts",
|
||||
"./server-sent-event-stream": "./server_sent_event_stream.ts",
|
||||
|
1206
http/header.ts
Normal file
1206
http/header.ts
Normal file
File diff suppressed because it is too large
Load Diff
16
http/header_test.ts
Normal file
16
http/header_test.ts
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
import { HEADER } from "./header.ts";
|
||||
import { assertEquals } from "@std/assert";
|
||||
|
||||
Deno.test({
|
||||
name: "HEADER",
|
||||
fn() {
|
||||
// just spot check a few common codes
|
||||
assertEquals(HEADER.Accept, "Accept");
|
||||
assertEquals(HEADER.AIm, "A-IM");
|
||||
assertEquals(HEADER.ClientCertChain, "Client-Cert-Chain");
|
||||
assertEquals(HEADER.Connection, "Connection");
|
||||
assertEquals(HEADER.Origin, "Origin");
|
||||
assertEquals(HEADER.Referer, "Referer");
|
||||
},
|
||||
});
|
@ -69,4 +69,5 @@ export * from "./signed_cookie.ts";
|
||||
export * from "./server_sent_event_stream.ts";
|
||||
export * from "./user_agent.ts";
|
||||
export * from "./file_server.ts";
|
||||
export * from "./header.ts";
|
||||
export * from "./method.ts";
|
||||
|
Loading…
Reference in New Issue
Block a user