Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apinspector-react

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apinspector-react - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "apinspector-react",
"version": "1.0.1",
"version": "1.0.2",
"description": "Import in your ReactJS project to log the request and responses. Install APINSPECTOR desktop application and monitor the API logs",

@@ -5,0 +5,0 @@ "main": "inspector.js",

@@ -17,3 +17,3 @@ # APINSPECTOR FOR REACT

import axios from "axios"
import logger from './logger'
import inspector from 'apinspector-react'

@@ -29,7 +29,7 @@ let instance = axios.create({

//Initialize logger with your API Key
logger.init("your APINSPECTOR apikey")
inspector.init("your APINSPECTOR apikey")
//Request interceptor
instance.interceptors.request.use( (config)=> {
return logger.getAxiosRequestConfig(config)
return inspector.getAxiosRequestConfig(config)
},

@@ -43,3 +43,3 @@ (error)=> {

response => {
logger.sendRequestMetrics(response,'axios')
inspector.sendRequestMetrics(response,'axios')
return response.data

@@ -62,3 +62,3 @@ },

import logger from './logger'
import inspector from 'apinspector-react'

@@ -74,3 +74,3 @@ const api = create({

logger.init("your APINSPECTOR apikey")
inspector.init("your APINSPECTOR apikey")

@@ -81,3 +81,3 @@ //Request interceptor

return logger.getAxiosRequestConfig(config)
return inspector.getAxiosRequestConfig(config)

@@ -92,3 +92,3 @@ },(error) => {

logger.sendRequestMetrics(response, 'apisauce')
inspector.sendRequestMetrics(response, 'apisauce')

@@ -95,0 +95,0 @@ return response.data

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