Skip to content

Commit 1322d47

Browse files
authored
Merge pull request #2 from benhason1/feature-change-readme
change readme and removed unused file
2 parents 189df64 + bd42e02 commit 1322d47

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.eslintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
.eslintrc.js
2-
index.ts
1+
.eslintrc.js

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# nestjs-http-promise
2+
[![npm version](https://img.shields.io/npm/v/nestjs-http-promise.svg?style=flat-square)](https://www.npmjs.org/package/nestjs-http-promise)
23

34
## description
45
nestjs module that just doing little modification to the original and good **nestjs** http module.
56

67

78
## features
89
* axios - the most used package for http requests in npm.
9-
* promise based - most of us using the current http module and on every call do `.toPromise()`
10-
because most of the time we do not need the features of observable.
11-
* retries - one of the powerful features of observable is its ability to do in very simple way,
12-
you can do it by just adding the retry operator, this package will provide you the same feature even in easier way,
13-
just pass `{ retries: NUMBER_OF_RETRIES }` in the config of the http module.
10+
* promise based - most of us using the current http module that uses observable which we don't use most of the time
11+
and in order to avoid it were just calling `.toPromise()` every http call.
12+
* retries - in many cases we will want to retry a failing http call.
13+
with observable we could just add the retry operator (rxjs) but with promises we need to implement this logic ourselves.
14+
this package will make it easy for you, just pass `{ retries: NUMBER_OF_RETRIES }` in the config of the http module.
15+
**more details in the configuration section**
16+
1417
## quick start
1518
### installing
1619
Using npm:
@@ -99,7 +102,7 @@ Note that in this example, the HttpConfigService has to implement HttpModuleOpti
99102
@Injectable()
100103
class HttpConfigService implements HttpModuleOptionsFactory {
101104
async createHttpOptions(): Promise<HttpModuleOptions> {
102-
const configurationData = await sonmeAsyncMethod();
105+
const configurationData = await someAsyncMethod();
103106
return {
104107
timeout: configurationData.timeout,
105108
retries: 5,

index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)