Skip to content

Commit 4d19669

Browse files
committed
Set JSON content type on JsonResponse
1 parent 9ce9b2f commit 4d19669

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/response/JsonResponse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export class JsonResponse<T> extends TextResponse {
99
*/
1010
public constructor(json: T, statusCode = 200, headers?: HeadersInit) {
1111
super(JsonResponse.serialise(json), statusCode, headers);
12+
this.headers.set("content-type", "application/json");
1213
}
1314

1415
protected static serialise(value: any): string {

0 commit comments

Comments
 (0)