# node-https-response

> A simple object to return http response object with required headers for AWS api gatway to enable the cors

Latest version **1.3.0** (published 2019-10-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-https-response
pnpm add node-https-response
yarn add node-https-response
bun add node-https-response
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2019-10-01 |
| First published | 2019-09-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | pranay2111 |
| Maintainers | pranay2111 |
| Keywords | http, https, response, request, nodejs |

## Links

- npm: https://www.npmjs.com/package/node-https-response
- Repository: https://github.com/Pranay2111/node-https-response
- Homepage: https://github.com/Pranay2111/node-https-response#readme
- Issues: https://github.com/Pranay2111/node-https-response/issues
- npm.io page: https://npm.io/package/node-https-response

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2019-10-01
- 1.2.0 — 2019-09-30
- 1.1.0 — 2019-09-30
- 1.0.0 — 2019-09-30

## README

# node-https-response

A simple object to return http response object with required headers for AWS api gatway to enable the cors

[![Build Status](https://github.com/Pranay2111/node-https-response)](https://github.com/Pranay2111/node-https-response)
[![NPM version](https://img.shields.io/npm/v/http-response-object.svg)](https://www.npmjs.com/package/node-https-response)


## Installation

    npm install node-https-response

## Usage
//success method 
```js
var response = require('node-https-response');
var res = new response.success(200, 'Successfully submited' , 'This is my Data' , { header1 : 25, header2 :'Play'} );
//statusCode === 200 
//message === OK
//body === {}
//headers === {} , if headers are not passed , default headers will be passed to enable the cors for AWS API gateway .

//error method
var response = require('node-https-response');
var res = new response.error(404, 'Page Not found' );
//statusCode === 400
//message === 'Bad Request'
```

## Properties

 - `statusCode`: Number - the status code of the response
 - `body`: Object | String - object of statusCode, message, data as a parameter
 - `headers`: Object - the headers of the response.  The keys are automatically made lower case.

## License

  ISC

---
_Source: https://npm.io/package/node-https-response · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
