Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Wraps the built-in node request
function with a few extras:
content-length
header if not already presenthttp
or https
transport depending on the input URLExample
const request = require('req-then')
request('http://www.bbc.co.uk')
.then(response => {
console.log('Response received', response.data)
console.log('The nodejs response instance', response.res)
})
.catch(console.error)
external:Promise
⏏Returns a promise for the response.
Kind: Exported function
Resolve: object
- res
will be the node response object, data
will be the data, req
the original request.
Reject: Error
Param | Type | Description |
---|---|---|
reqOptions | string | object | Target url string or a standard node.js http request options object. |
[data] | * | Data to send with the request. |
© 2015-16 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.
FAQs
Simple http(s) request function, returning a promise.
The npm package req-then receives a total of 2,418 weekly downloads. As such, req-then popularity was classified as popular.
We found that req-then demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.