Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 7c7c31f

Browse files
Replaces Content-Type header ordering
1 parent 4210a3a commit 7c7c31f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Package.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name = "[email protected]/reno"
22
description = "A thin routing library designed to sit on top of Deno's standard HTTP module"
3-
version = "0.5.0"
3+
version = "0.5.1"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
textResponse,
1313
jsonResponse,
1414
streamResponse,
15-
} from 'https://raw.githubusercontent.com/jamesseanwright/reno/v0.5.0/reno/mod.ts';
15+
} from 'https://raw.githubusercontent.com/jamesseanwright/reno/v0.5.1/reno/mod.ts';
1616

1717
export const routes = createRouteMap([
1818
['/home', () => textResponse('Hello world!')],

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reno",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "A thin routing library designed to sit on top of Deno's standard HTTP module",
55
"main": "reno/mod.ts",
66
"repository": {

reno/helpers.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export const jsonResponse = <TResponseBody = {}>(
5858
headers: domTypes.HeadersInit = {}
5959
) => ({
6060
headers: new Headers({
61-
...headers,
62-
"Content-Type": "application/json"
61+
"Content-Type": "application/json",
62+
...headers
6363
}),
6464
body: encoder.encode(JSON.stringify(body))
6565
});
@@ -69,8 +69,8 @@ export const textResponse = (
6969
headers: domTypes.HeadersInit = {}
7070
) => ({
7171
headers: new Headers({
72-
...headers,
73-
"Content-Type": "text/plain"
72+
"Content-Type": "text/plain",
73+
...headers
7474
}),
7575
body: encoder.encode(body)
7676
});

0 commit comments

Comments
 (0)