@digitalbazaar/http-client
Advanced tools
Comparing version 4.0.0 to 4.1.0
{ | ||
"name": "@digitalbazaar/http-client", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "An opinionated, isomorphic HTTP client.", | ||
@@ -16,2 +16,5 @@ "license": "BSD-3-Clause", | ||
}, | ||
"react-native": { | ||
"./lib/agentCompatibility.js": "./lib/agentCompatibility-browser.js" | ||
}, | ||
"scripts": { | ||
@@ -18,0 +21,0 @@ "rollup": "rollup -c rollup.config.js", |
# http-client | ||
An opinionated, isomorphic HTTP client. | ||
An opinionated, isomorphic HTTP client for Node.js, browsers, and React Native. | ||
### Usage | ||
#### Import httpClient | ||
#### Import httpClient (Node.js) | ||
```js | ||
@@ -12,2 +12,7 @@ import https from 'https'; | ||
#### Import httpClient (browsers or React Native) | ||
```js | ||
import {httpClient} from '@digitalbazaar/http-client'; | ||
``` | ||
#### Import and initialize a custom Bearer Token client | ||
@@ -41,3 +46,3 @@ ```js | ||
#### GET a JSON response in Node with a HTTP Agent | ||
#### GET a JSON response in Node with an HTTP Agent | ||
```js | ||
@@ -89,3 +94,3 @@ import https from 'https'; | ||
#### POST a JSON payload in Node with a HTTP Agent | ||
#### POST a JSON payload in Node with an HTTP Agent | ||
```js | ||
@@ -92,0 +97,0 @@ import https from 'https'; |
20958
111