http-response-object

  • Version 3.0.2
  • Published
  • 6.78 kB
  • 1 dependency
  • MIT license

Install

npm i http-response-object
yarn add http-response-object
pnpm add http-response-object

Overview

A simple object to represent an http response

Index

Classes

class Response

class Response<TBody> {}
  • A response from a web request

constructor

constructor(statusCode: number, headers: any, body: {}, url: string);

    property body

    readonly body: {};

      property headers

      readonly headers: any;

        property statusCode

        readonly statusCode: number;

          property url

          readonly url: string;

            method getBody

            getBody: { (encoding: string): string; (): TBody };

              method isError

              isError: () => boolean;

                Package Files (1)

                Dependencies (1)

                Dev Dependencies (2)

                Peer Dependencies (0)

                No peer dependencies.

                Badge

                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/http-response-object.

                • Markdown
                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/http-response-object)
                • HTML
                  <a href="https://www.jsdocs.io/package/http-response-object"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>