2.1.8 • Published 1 year ago

http-rx v2.1.8

Weekly downloads
51
License
MIT
Repository
github
Last release
1 year ago

Travis build Maintainability Test Coverage npm statistic

HttpRx

A JavaScript library wrapping best of Observable and Request. No more, no less.

It does only one thing and does it very well - provides a possibility to execute http requests in reactive manner.

It does not break http semantics.

See live demo HERE.

This means, that everything with status code less than 400 is considered to be a success and everything with status code more or equal to 400 is considered to be an error.

Examples

const httpRx = require('http-rx');
const { map, catchError, finalize } = require('rxjs/operators');
const userName = 'jasonrammoray';
const url = `https://api.github.com/users/${userName}`;
httpRx.get(url, {
    headers: {
      'User-Agent': 'Test user Agent'
    },
    json: true
})
.pipe(
    map(data => data.body.bio),
    catchError(error => console.error('Can not obtain user data, because: ', error)),
    finalize(() => console.info('GitHub user data fetching procedure is done'))
)
.subscribe(userBio => console.log(`GitHub user bio is: ${userBio}`));

Pull-requests

Rules are simple:

  • cover your changes with tests
  • make sure, that your code complies with coding standards in the project
2.1.8

1 year ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.8

4 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago