Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@everymundo/promise-data-to
Advanced tools
This is a helper to perform POST requests using promises and no external dependencies
This is a helper to perform POST requests using promises.
npm install @everymundo/promise-data-to
const httpClient = require('@everymundo/promise-data-to')
const headers = { 'content-type': 'application/json' }
const endpoint = new httpClient.PostEndpoint('http://your-host.com/path', headers)
const data = { myData:'Something' }
const res = await httpClient.promiseDataTo(endpoint, data)
const httpClient = require('@everymundo/promise-data-to')
const headers = { 'authorization': 'your token' }
const endpoint = new httpClient.GetEndpoint('http://your-host.com/path', headers)
const res = await httpClient.promiseGet(endpoint)
const httpClient = require('@everymundo/promise-data-to')
const headers = { 'authorization': 'your token' }
const res = await httpClient.fetch('http://your-host.com/path', { headers, body: data })
const { fetch } = require('@everymundo/promise-data-to')
const headers = { 'authorization': 'your token' }
const res = await fetch('http://your-host.com/path', { headers })
{
statusCode, // the response statusCode
code, // alias for statusCode [for backaward compatibility]
start, // Date Object captured right before starting the request
end: Date.now(), // Int Timestamp from when the request has finished
attempt, // the number of attempts of the retries
endpoint, // the endpoint object either passed or generated from a string
resTxt, // alias for responseText [for backaward compatibility]
responseText, // the response buffer.toString()
buffer, // raw response buffer
dataType, // the name of the constructor of the posted data [Array, Object, String, Buffer]
dataLen, // when posting arrays it shows the number of array items posted
compress, // the type of compression for the POST request, if any. Valid values are gzip and deflate
requestHeaders, // the headers used on the request
responseHeaders // the headers received from the remote server
}
FAQs
This is a helper to perform POST requests using promises and no external dependencies
The npm package @everymundo/promise-data-to receives a total of 4 weekly downloads. As such, @everymundo/promise-data-to popularity was classified as not popular.
We found that @everymundo/promise-data-to demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 34 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.