(message: HTTPMessage)
| 12 | |
| 13 | export class MessageUtils { |
| 14 | static getContentType(message: HTTPMessage): string | undefined { |
| 15 | const ct = MessageUtils.get_first_header(message, /^Content-Type$/i); |
| 16 | if (ct) { |
| 17 | return ct.split(";")[0].trim(); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | static get_first_header( |
| 22 | message: HTTPMessage, |
no test coverage detected