(headers: IncomingHttpHeaders)
| 215 | } |
| 216 | |
| 217 | function getContentType(headers: IncomingHttpHeaders): string | undefined { |
| 218 | const value = headers['content-type'] |
| 219 | if (Array.isArray(value)) |
| 220 | return value[0] |
| 221 | return value |
| 222 | } |
| 223 | |
| 224 | function asRecord(value: unknown): Record<string, unknown> | null { |
| 225 | return value !== null && typeof value === 'object' |
no outgoing calls
no test coverage detected