| 12 | } |
| 13 | |
| 14 | void testWebConstants() |
| 15 | { |
| 16 | output << __FUNCTION__ << endl; |
| 17 | |
| 18 | const char* extensions[] = { |
| 19 | "htm", "html", "txt", "js", "css", "xml", "json", "jpg", "gif", |
| 20 | "png", "svg", "ico", "gzip", "zip", "git", "sh", "bin", "exe", |
| 21 | }; |
| 22 | |
| 23 | for(auto ext : extensions) { |
| 24 | String contentType = ContentType::fromFileExtension(ext); |
| 25 | if(!contentType) { |
| 26 | contentType = F("(NOT FOUND)"); |
| 27 | } |
| 28 | MimeType mimeType = ContentType::fromString(contentType); |
| 29 | output << " " << ext << ": " << contentType << " (#" << unsigned(mimeType) << ')' << endl; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | } // namespace |
| 34 |
no test coverage detected