We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc7807a commit ff4c472Copy full SHA for ff4c472
1 file changed
src/prologue/core/contenttype.nim
@@ -22,6 +22,7 @@ proc parseContentType*(headerValue: string): MediaType =
22
## Parses a Content-Type header according to RFC 7230, RFC 2045, and RFC 2046.
23
## Returns a MediaType object containing the main type, sub type, and parameters.
24
runnableExamples:
25
+ import std/tables
26
let mediaType = parseContentType("text/plain; charset=\"utf-8\"")
27
doAssert mediaType.mainType == "text"
28
doAssert mediaType.subType == "plain"
0 commit comments