New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

axios-easy-auth

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-easy-auth - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "axios-easy-auth",
"version": "1.0.3",
"version": "1.0.4",
"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 />
<img src="https://i.ibb.co/XV5q9BB/01.png" alt="Создание класса EasyAuth">
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9')</pre>
<p>

@@ -9,3 +9,11 @@ First we need to create the EasyAuth class. Parameters accept site url, access token.

<br />
<img src="https://i.ibb.co/j4Dz4rZ/02.png" alt="POST запрос">
<pre>
const postData = async () => {
const responce = await auth.post('/posts', {}, {Header: 'value'})
// post(path: string, body: array, headers: array)
console.log('POST')
console.log(responce.data)
}
</pre>
<p>

@@ -26,9 +34,16 @@ Then you can make requests to the server.

<br />
<img src="https://i.ibb.co/XV5q9BB/01.png" alt="Создание класса EasyAuth">
<pre>const auth = new EasyAuth('https://jsonplaceholder.typicode.com', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9')</pre>
<p>
<pre>`const auth = new EasyAuth('http://site.com', 'Bearer ey251txcfhjguuy45tyhjafduv7ucshnfd')`</pre>
Для начала нужно создать класс EasyAuth. Параметрами принимает url сайта, access токен.
</p>
<br />
<img src="https://i.ibb.co/j4Dz4rZ/02.png" alt="POST запрос">
<pre>
const postData = async () => {
const responce = await auth.post('/posts', {}, {Header: 'value'})
// post(path: string, body: array, headers: array)
console.log('POST')
console.log(responce.data)
}
</pre>
<p>

@@ -35,0 +50,0 @@ Далее можно делать запросы на сервер.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc