Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kaykyr committed Jan 28, 2023
1 parent 22a81cc commit f4e39d7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/nexus-request.svg?style=flat-square)](https://gitter.im/mzabriskie/nexus-request)
[![Known Vulnerabilities](https://snyk.io/test/npm/nexus-request/badge.svg)](https://snyk.io/test/npm/nexus-request)




</div>

## Features

- Make [http](https://nodejs.org/api/http.html) and [http2](https://nodejs.org/api/http2.html) requests from node.js
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
- Intercept response
- Decompress ZSTD response
- Transform request and response data
- Automatic transforms for [JSON](https://www.json.org/json-en.html) data

Expand All @@ -39,14 +37,12 @@ Using npm:
$ npm install nexus-request
```


Using yarn:

```bash
$ yarn add nexus-request
```


Once the package is installed, you can import the library using `import` or `require` approach:

```js
Expand All @@ -71,7 +67,7 @@ const response = await nexus('https://httpbin.org/post', {
})

console.log('Response: ', response.data)
````
```

## Example

Expand Down Expand Up @@ -233,8 +229,11 @@ const instance = new Nexus({
The available instance methods are listed below. The specified config will be merged with the instance config.

##### nexus#get(url[, config])

##### nexus#delete(url[, config])

##### nexus#post(url[, data[, config]])

##### nexus#put(url[, data[, config]])

## Request Config
Expand Down Expand Up @@ -369,4 +368,4 @@ The response for a request contains the following information.

## License

[MIT](LICENSE)
[MIT](LICENSE)

0 comments on commit f4e39d7

Please sign in to comment.