• Version 9.0.0
  • Published
  • 66.4 kB
  • 5 dependencies
  • Apache-2.0 license


npm i teeny-request
yarn add teeny-request
pnpm add teeny-request


Like request, but smaller.



function teenyRequest

teenyRequest: typeof teenyRequest;


    class RequestError

    class RequestError extends Error {}

      property code

      code?: number;


        interface CoreOptions

        interface CoreOptions {}

          property body

          body?: string | {};

            property forever

            forever?: boolean;

              property gzip

              gzip?: boolean;

                property headers

                headers?: Headers;

                  property json

                  json?: any;

                    property method

                    method?: string;

                      property multipart

                      multipart?: RequestPart[];

                        property pool

                        pool?: HttpsAgentOptions | HttpAgentOptions;

                          property proxy

                          proxy?: string;

                            property qs

                            qs?: any;

                              property timeout

                              timeout?: number;

                                property useQuerystring

                                useQuerystring?: boolean;

                                  interface OptionsWithUri

                                  interface OptionsWithUri extends CoreOptions {}

                                    property uri

                                    uri: string;

                                      interface OptionsWithUrl

                                      interface OptionsWithUrl extends CoreOptions {}

                                        property url

                                        url: string;

                                          interface Request

                                          interface Request extends PassThrough {}

                                            property agent

                                            agent: Agent | false;

                                              property headers

                                              headers: Headers;

                                                property href

                                                href?: string;

                                                  interface RequestCallback

                                                  interface RequestCallback<T = any> {}

                                                    call signature

                                                    (err: Error | null, response: Response, body?: T): void;

                                                      interface RequestPart

                                                      interface RequestPart {}

                                                        property body

                                                        body: string | Readable;

                                                          interface Response

                                                          interface Response<T = any> {}

                                                            property body

                                                            body: T;

                                                              property headers

                                                              headers: Headers;

                                                                property request

                                                                request: Request;

                                                                  property statusCode

                                                                  statusCode: number;

                                                                    property statusMessage

                                                                    statusMessage?: string;

                                                                      Type Aliases

                                                                      type Options

                                                                      type Options = OptionsWithUri | OptionsWithUrl;


                                                                        namespace teenyRequest

                                                                        namespace teenyRequest {}

                                                                          variable stats

                                                                          var stats: TeenyStatistics;

                                                                            function defaults

                                                                            defaults: (
                                                                            defaults: CoreOptions
                                                                            ) => (
                                                                            reqOpts: Options,
                                                                            callback?: RequestCallback<any> | undefined
                                                                            ) => void | Request;

                                                                              function resetStats

                                                                              resetStats: () => void;

                                                                                Package Files (1)

                                                                                Dependencies (5)

                                                                                Dev Dependencies (14)

                                                                                Peer Dependencies (0)

                                                                                No peer dependencies.


                                                                                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/teeny-request.

                                                                                • Markdown
                                                                                • HTML
                                                                                  <a href="https://www.jsdocs.io/package/teeny-request"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>