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

fwk-api

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fwk-api - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

22

index.js

@@ -8,20 +8,12 @@ import axios from 'axios'

init: (cfg) => {
info = cfg
console.log('api cfg: ', info)
const headersInfo ={
const headersDef = {
// 'Access-Control-Allow-Credentials':'true',
'Accept': 'application/json, text/plain, */*',
'Content-Type': (info.ctype)? info.ctype:'application/json',
'legajo': info.legajo,
'legajoCSG': info.legajoCSG,
'mockmode': info.mockmode,
'isMobile': info.isMobile
'Content-Type': 'application/json'
}
if (info.acao)
headersInfo['Access-Control-Allow-Origin']= info.acao
const headers = {...headersDef, ...cfg.headers}
srv = axios.create({
baseURL: info.url,
headers: headersInfo
headers: headers
})

@@ -57,2 +49,5 @@ console.log('API SERVICE initialization srv:', srv)

},
setHeaders:(headers)=>{
srv.defaults.headers = {...srv.defaults.headers, ...headers}
},
setMockFlag: (flag) => {

@@ -69,4 +64,3 @@ delete srv.defaults.headers.mockmode

},
async sendFile (path, params) {
var formData = new FormData()
sendFile (path, params) {
formData.append("data", params.data)

@@ -73,0 +67,0 @@

{
"name": "fwk-api",
"version": "0.0.19",
"version": "0.0.20",
"description": "Framework with api services access(only javascript)",

@@ -17,4 +17,4 @@ "main": "index.js",

"dependencies": {
"axios": "^0.21.1"
"axios": "^0.23.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