UNPKG

pluto-http-client

Version:

HTTP client for NodeJS. Inspired in the Java JAX-RS spec so you can expect excellence, versatility and extensibility.

53 lines (52 loc) 2.05 kB
import { Cookie } from "../core/cookie"; export declare enum Event { Token = 0, QuotedString = 1, Comment = 2, Separator = 3, Control = 4 } export declare class HttpHeaderReader { private header; private processComments; private index; private readonly length; private _value?; private event?; private static readonly TOKEN; private static readonly QUOTED_STRING; private static readonly COMMENT; private static readonly SEPARATOR; private static readonly CONTROL; private static readonly WHITE_SPACE; private static readonly SEPARATORS; private static readonly TYPE_TABLE; private static readonly IS_TOKEN; constructor(header: string, processComments?: boolean); hasNext(): boolean; get value(): string | undefined; skipWhiteSpace(): boolean; isWhiteSpace(c: string): boolean; isSeparator(c: string): boolean; nextToken(): string; nextSeparator(seperator: string): void; hasNextSeparator(separator: string, skipWhiteSpace: boolean): boolean; next(skipWhiteSpace?: boolean, preserveBackslash?: boolean): Event; getNextCharacter(skipWhiteSpace: boolean): number; getType(c: number): number; isToken(c: number): boolean; processQuotedString(preserveBackslash: boolean): void; nextQuotedString(): string | undefined; nextTokenOrQuotedString(preserveBackslash: boolean): string; filterToken(s: string, start: number, end: number, preserveBackslash?: boolean): string; processComment(): void; process(c: number, preserveBackslash: boolean): Event; private static createTableType; private static createTokenTable; static readParameters(reader: HttpHeaderReader, fileNameFix?: boolean): Map<string, string>; static appendQuotedIfWhitespace(buffer: string[], s: string): void; static appendQuotedIfNonToken(b: string[], value: string): void; private static isTokenString; private static appendEscapingQuotes; static parseCookie(header?: string): Cookie | undefined; }