axios-encrypt
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Axios plugin for encrypting your requests.

npm

At the moment library encrypts only body of requests.

Install

yarn add axios-encrypt

or

npm i -S axios-encrypt

Usage

Connect example:

import axios from 'axios'
import { applyEncryptToAxios } from 'axios-encrypt'
import CryptoJS from 'crypto-js'

const apiClient = axios.create({})


applyEncryptToAxios(apiClient, {
  onEncrypt(str: string): string {
    let encrypted = CryptoJS.AES.encrypt(str, 'secret')
    return encrypted.toString()
  },
})

Works with:

Readme

Keywords

Package Sidebar

Install

npm i axios-encrypt

Weekly Downloads

55

Version

0.0.1

License

none

Unpacked Size

3.84 kB

Total Files

6

Last publish

Collaborators

  • zvs001