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

@platformatic/client

Package Overview
Dependencies
Maintainers
6
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/client - npm Package Compare versions

Comparing version 1.14.0 to 1.14.1

29

index.js

@@ -139,2 +139,3 @@ 'use strict'

const canHaveBody = method === 'POST' || method === 'PUT' || method === 'PATCH' || method === 'OPTIONS'
const pathParams = methodMeta.parameters?.filter(p => p.in === 'path') || []

@@ -217,12 +218,15 @@ const queryParams = methodMeta.parameters?.filter(p => p.in === 'query') || []

try {
res = await request(urlToCall, {
const requestOptions = {
method,
headers: {
...headers,
...telemetryHeaders,
'content-type': 'application/json; charset=utf-8'
...telemetryHeaders
},
body: JSON.stringify(body),
throwOnError
})
}
if (canHaveBody) {
requestOptions.headers['content-type'] = 'application/json; charset=utf-8'
requestOptions.body = JSON.stringify(body)
}
res = await request(urlToCall, requestOptions)
let responseBody

@@ -242,10 +246,2 @@ const contentType = sanitizeContentType(res.headers['content-type']) || 'application/json'

}
if (fullResponse) {
return {
statusCode: res.statusCode,
headers: res.headers,
body: responseBody
}
}
if (validateResponse) {

@@ -273,2 +269,9 @@ try {

}
if (fullResponse) {
return {
statusCode: res.statusCode,
headers: res.headers,
body: responseBody
}
}
return responseBody

@@ -275,0 +278,0 @@ } catch (err) {

{
"name": "@platformatic/client",
"version": "1.14.0",
"version": "1.14.1",
"description": "A client for all platformatic backends",

@@ -27,3 +27,3 @@ "main": "index.js",

"typescript": "^5.2.2",
"@platformatic/telemetry": "1.14.0"
"@platformatic/telemetry": "1.14.1"
},

@@ -30,0 +30,0 @@ "dependencies": {

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