@types/http-string-parser
TypeScript icon, indicating that this package has built-in type declarations

0.0.33 • Public • Published

Installation

npm install --save @types/http-string-parser

Summary

This package contains type definitions for http-string-parser (https://github.com/apiaryio/http-string-parser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-string-parser.

index.d.ts

interface ParseRequestResult {
    method: string;
    uri: string;
    headers: { [key: string]: string };
    body: string;
}

interface ParseResponseResult {
    statusCode: string;
    statusMessage: string;
    headers: { [key: string]: string };
    body: string;
}

interface ParseRequestLineResult {
    method: string;
    uri: string;
    protocol: string;
}

interface ParseStatusLineResult {
    protocol: string;
    statusCode: string;
    statusMessage: string;
}

export declare function parseRequest(requestString: string): ParseRequestResult;
export declare function parseResponse(responseString: string): ParseResponseResult;
export declare function parseRequestLine(requestLineString: string): ParseRequestLineResult;
export declare function parseStatusLine(statusLine: string): ParseStatusLineResult;
export declare function parseHeaders(headerLines: string[]): { [key: string]: string };

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/http-string-parser

Weekly Downloads

1,890

Version

0.0.33

License

MIT

Unpacked Size

4.24 kB

Total Files

5

Last publish

Collaborators

  • types