ContentTypeParser() — fastify Function Reference
Architecture documentation for the ContentTypeParser() function in content-type-parser.js from the fastify codebase.
Entity Profile
Dependency Diagram
graph TD 251437cc_c0a4_5fd8_ead1_3da0578dcbb0["ContentTypeParser()"] b47c11f3_fe3b_64dc_0f58_921e5921ec45["content-type-parser.js"] 251437cc_c0a4_5fd8_ead1_3da0578dcbb0 -->|defined in| b47c11f3_fe3b_64dc_0f58_921e5921ec45 8a1f473e_4fd9_aa0e_e5e9_e87c9817c86f["buildContentTypeParser()"] 8a1f473e_4fd9_aa0e_e5e9_e87c9817c86f -->|calls| 251437cc_c0a4_5fd8_ead1_3da0578dcbb0 7f1adcd1_a085_05c7_d640_bc45d65ddcb4["getDefaultJsonParser()"] 251437cc_c0a4_5fd8_ead1_3da0578dcbb0 -->|calls| 7f1adcd1_a085_05c7_d640_bc45d65ddcb4 0b4bab63_088f_d4fe_2577_c45d409a3deb["Parser()"] 251437cc_c0a4_5fd8_ead1_3da0578dcbb0 -->|calls| 0b4bab63_088f_d4fe_2577_c45d409a3deb style 251437cc_c0a4_5fd8_ead1_3da0578dcbb0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
lib/content-type-parser.js lines 33–42
function ContentTypeParser (bodyLimit, onProtoPoisoning, onConstructorPoisoning) {
this[kDefaultJsonParse] = getDefaultJsonParser(onProtoPoisoning, onConstructorPoisoning)
// using a map instead of a plain object to avoid prototype hijack attacks
this.customParsers = new Map()
this.customParsers.set('application/json', new Parser(true, false, bodyLimit, this[kDefaultJsonParse]))
this.customParsers.set('text/plain', new Parser(true, false, bodyLimit, defaultPlainTextParser))
this.parserList = ['application/json', 'text/plain']
this.parserRegExpList = []
this.cache = new Fifo(100)
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does ContentTypeParser() do?
ContentTypeParser() is a function in the fastify codebase, defined in lib/content-type-parser.js.
Where is ContentTypeParser() defined?
ContentTypeParser() is defined in lib/content-type-parser.js at line 33.
What does ContentTypeParser() call?
ContentTypeParser() calls 2 function(s): Parser, getDefaultJsonParser.
What calls ContentTypeParser()?
ContentTypeParser() is called by 1 function(s): buildContentTypeParser.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free