MCPcopy Create free account
hub / github.com/11ty/dev-server / getContentType

Function getContentType

server/wrapResponse.js:1–11  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

1function getContentType(headers) {
2 if(!headers) {
3 return;
4 }
5
6 for(let key in headers) {
7 if(key.toLowerCase() === "content-type") {
8 return headers[key];
9 }
10 }
11}
12
13// Inspired by `resp-modifier` https://github.com/shakyShane/resp-modifier/blob/4a000203c9db630bcfc3b6bb8ea2abc090ae0139/index.js
14function wrapResponse(resp, transformHtml) {

Callers 1

wrapResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…