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

@dewib/dw-api

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

@dewib/dw-api - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [2.0.1](https://github.com/gaetansenn/dw-api/compare/v2.0.0...v2.0.1) (2021-10-05)
### Bug Fixes
* avoid Content-Length for request withtout body (GET) ([bad6fd8](https://github.com/gaetansenn/dw-api/commit/bad6fd850279a8e278eaadd0b85b461401dc8762))
## [2.0.0](https://github.com/gaetansenn/dw-api/compare/v1.1.0...v2.0.0) (2021-09-02)

@@ -7,0 +14,0 @@

13

lib/utils/model.js

@@ -76,10 +76,13 @@ import { isObject, camelCase, isEmpty, isString, get } from 'lodash'

handleRequest ({ method, url, body = {}, fields = [], multi = false, queryParams = {}, headers = {}, catchError = true, scope }) {
return this.$axios({
handleRequest ({ method, url, body = false, fields = [], multi = false, queryParams = {}, headers = {}, catchError = true, scope }) {
const request = {
method,
url,
headers,
params: queryParams,
data: body
}).then((response) => {
params: queryParams
}
if (body) request.data = body
return this.$axios(request).then((response) => {
// Inject scope

@@ -86,0 +89,0 @@ response.data = scope ? get(response.data, scope) : response.data

{
"name": "@dewib/dw-api",
"version": "2.0.0",
"version": "2.0.1",
"description": "Wrap all your request into one place and map your response for your needs",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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