apinspector-react
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9125