Class: ContentType
@divine/headers.ContentType
Hierarchy
- ↳ - ContentType
Constructors
constructor
• new ContentType(unparsed, charset?)
Parameters
| Name | Type | 
|---|---|
| unparsed | string|ContentType | 
| charset? | string | 
Overrides
Defined in
headers/src/content-headers.ts:137
Properties
headerName
• Optional Readonly headerName: string
Inherited from
Defined in
headers/src/content-headers.ts:9
params
• Readonly params: ContentHeaderParams = {}
Inherited from
Defined in
headers/src/content-headers.ts:7
Accessors
baseType
• get baseType(): string
Returns
string
Defined in
headers/src/content-headers.ts:145
charset
• get charset(): undefined | string
Returns
undefined | string
Defined in
headers/src/content-headers.ts:153
subType
• get subType(): string
Returns
string
Defined in
headers/src/content-headers.ts:149
type
• get type(): string
Returns
string
Inherited from
ContentHeader.type
Defined in
headers/src/content-headers.ts:49
bytes
• Static get bytes(): ContentType
Returns
Defined in
headers/src/content-headers.ts:118
csv
• Static get csv(): ContentType
Returns
Defined in
headers/src/content-headers.ts:119
dir
• Static get dir(): ContentType
Returns
Defined in
headers/src/content-headers.ts:120
formData
• Static get formData(): ContentType
Returns
Defined in
headers/src/content-headers.ts:121
html
• Static get html(): ContentType
Returns
Defined in
headers/src/content-headers.ts:122
json
• Static get json(): ContentType
Returns
Defined in
headers/src/content-headers.ts:123
stream
• Static get stream(): ContentType
Returns
Defined in
headers/src/content-headers.ts:124
text
• Static get text(): ContentType
Returns
Defined in
headers/src/content-headers.ts:125
urlencoded
• Static get urlencoded(): ContentType
Returns
Defined in
headers/src/content-headers.ts:126
xml
• Static get xml(): ContentType
Returns
Defined in
headers/src/content-headers.ts:127
Methods
param
▸ param(name): undefined | string
Parameters
| Name | Type | 
|---|---|
| name | string | 
Returns
undefined | string
Inherited from
Defined in
headers/src/content-headers.ts:53
▸ param(name, fallback): string
Parameters
| Name | Type | 
|---|---|
| name | string | 
| fallback | string | 
Returns
string
Inherited from
Defined in
headers/src/content-headers.ts:54
setParam
▸ setParam(name, value): ContentType
Parameters
| Name | Type | 
|---|---|
| name | string | 
| value | undefined|string|number | 
Returns
Inherited from
Defined in
headers/src/content-headers.ts:59
toString
▸ toString(): string
Returns
string
Inherited from
Defined in
headers/src/content-headers.ts:70
valueOf
▸ valueOf(): string
Returns
string
Inherited from
Defined in
headers/src/content-headers.ts:86
create
▸ Static create(ct, fallback?): ContentType
Parameters
| Name | Type | 
|---|---|
| ct | undefined|null|string|ContentType | 
| fallback? | null|string|ContentType |