1 | export function parse(input: RequestLike | ResponseLike | string): ParsedMediaType;
|
2 | export function format(obj: MediaType): string;
|
3 |
|
4 | export interface ParsedMediaType {
|
5 | type: string;
|
6 | parameters: { [key: string]: string };
|
7 | }
|
8 |
|
9 | export interface MediaType {
|
10 | type: string;
|
11 | parameters?: { [key: string]: string } | undefined;
|
12 | }
|
13 |
|
14 | export interface RequestLike {
|
15 | headers: { [header: string]: string | string[] | undefined };
|
16 | }
|
17 |
|
18 | export interface ResponseLike {
|
19 | getHeader(name: string): number | string | string[] | undefined;
|
20 | }
|