HTTP Requests
Bottlenose doesn't have a module for HTTP data sources because it's simple to use existing libraries for this purpose.
With request-promise-native (based the request npm package for node.js):
import {from} from 'rxjs';
import request from 'request-promise-native';
const req$ = from(request({method: 'GET', uri: 'https://google.com'}));
req.subscribe(console.log);
With axios
(isomorphic):
import {from} from 'rxjs';
import axios from 'axios';
const req$ = from(axios.get('https://google.com'));
req.subscribe(console.log);
Other useful libraries:
[superagent]
[graphql-request]
Last updated
Was this helpful?