![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@articulate/asyncios
Advanced tools
A crocks Async wrapper for axios. Allows consumers to take advantage of the "lazy" data type while keeping a familiary API.
asyncios
accepts the same configuration arguments as the underlying axios function. See the axios documentation for more details.
// GET request
asyncios({ method: 'GET', url: '/user?ID=12345' })
.fork(
error => console.log(error),
response => console.log(response)
)
// same GET request, but using `params` configuration
asyncios({ method: 'GET', url: '/user', params: { ID: 12345 } })
.fork(
error => console.log(error),
response => console.log(response)
)
// POST request
asyncios({
method: 'POST',
url: '/user?ID=12345',
data: { firstName: 'Fred', lastName: 'Flinstone' },
})
.fork(
error => console.log(error),
response => console.log(response)
)
Async
-style cancellation is supported. See the crocks doucmentation for more details.
const cancel = asyncios({ method: 'GET', url: '/user?ID=12345' })
.fork(
error => console.log(error),
response => console.log(response),
() => console.log('cancelled!')
)
cancel()
axios
's cancellation token is also supported. Take note of the different behaviors--while cancelling via crocks will invoke fork
's third "cancel" callback, cancelling via axios will invoke fork
's first "rejected" callback. See axios's documentation for more details.
const source = axios.CancelToken.source()
asyncios({
method: 'GET',
url: '/user?ID=12345',
cancelToken: source.token
})
.fork(
error => {
if (axios.isCancel(error)) console.log(error.message)
else { /* handle error */ }
},
response => console.log(response)
)
source.cancel('My cancel message')
Thanks to the fine people who work on both axios & crocks.
Pretty sure is spencerfdavis's fault.
FAQs
A wrapper for promise-based library Axios into a crocks Async
We found that @articulate/asyncios demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 35 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.