mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
8f919465b0
This is a regression on several some features in the fetch API. To bring these back @stardazed/streams simply needs to be ported to TS and included in the //js directory. Towards #2608
17 lines
480 B
TypeScript
17 lines
480 B
TypeScript
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
import { test, assertEquals } from "./test_util.ts";
|
|
|
|
test(function fromInit(): void {
|
|
const req = new Request("https://example.com", {
|
|
body: "ahoyhoy",
|
|
method: "POST",
|
|
headers: {
|
|
"test-header": "value"
|
|
}
|
|
});
|
|
|
|
// @ts-ignore
|
|
assertEquals("ahoyhoy", req._bodySource);
|
|
assertEquals(req.url, "https://example.com");
|
|
assertEquals(req.headers.get("test-header"), "value");
|
|
});
|