
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@salus-js/http-client
Advanced tools
A library for making type-safe HTTP requests built on the popular Axios client.
A library for making type-safe HTTP requests built on the popular Axios client.
@salus-js/http-client builds on @salus-js/codec and @salus-js/http to make runtime type-checked HTTP requests a breeze. Let's run through a quick sample:
import { t } from '@salus-js/codec'
import { http } from '@salus-js/http'
import { AxiosClient } from '@salus-js/http-client'
const todoResource = t.object({
userId: t.number,
id: t.number,
title: t.string,
completed: t.boolean
})
const todoParams = t.object({
id: t.number
})
const getTodo = http.get('/todos/:id', {
params: todoParams,
response: todoResource
})
const client = AxiosClient.create('https://jsonplaceholder.typicode.com/')
const responsePromise = client.execute(getTodo, {
params: {
id: 1
}
})
responsePromise.then((response) => {
console.log(response.data)
})
When creating a new instance of the Salus Axios client, you need to specify a default baseURL. This URL will be prepended to all paths defined in your operations. Note that you are able to override the baseURL for a specific request.
FAQs
A library for making type-safe HTTP requests built on the popular Axios client.
The npm package @salus-js/http-client receives a total of 132 weekly downloads. As such, @salus-js/http-client popularity was classified as not popular.
We found that @salus-js/http-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.