axios-easy-auth
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "axios-easy-auth", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Modified axios with a simple addition of headers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
<h1>Were there any problems adding headers to the request?</h1> | ||
<h3>This library makes it easy.</h3> | ||
<br /> | ||
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9')</pre> | ||
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer <token>')</pre> | ||
<p> | ||
@@ -32,3 +32,3 @@ First we need to create the EasyAuth class. Parameters accept site url, access token. | ||
<br /> | ||
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9')</pre> | ||
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer <token>')</pre> | ||
<p> | ||
@@ -41,7 +41,6 @@ Для начала нужно создать класс EasyAuth. Параметрами принимает url сайта, access токен. | ||
const responce = await auth.post('/posts', {}, {Header: 'value'}) | ||
// post(path: string, body: array, headers: array) | ||
console.log('POST') | ||
console.log(responce.data) | ||
} | ||
// post(path: string, body: array, headers: array) | ||
</pre> | ||
@@ -48,0 +47,0 @@ <p> |
3806
52