
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@api-def/provider-http
Advanced tools
This package implements HTTP API provider for @api-def/core infrastructure.
In order to use the HTTP provider you will first need to create an API:
const api = createHttpApi({
baseUrl: 'https://my-api.com',
})
@api-def doesn't enforce any way the endpoints should be saved. For this example we will use an object to compose endpoints together
const news = {
get: api.defineJsonEndpoint<
void,
{
data: object[]
}
>({
method: 'GET',
url: '/news',
output: 'naive',
}),
create: api.defineJsonEndpoint<
{
title: string
content: string
},
{
data: object
}
>({
method: 'POST',
url: '/news',
output: 'naive',
}),
}
Then in order to execute the endpoints:
news.create.execute().then((value) => console.log(value))
news.get.execute().then((value) => console.log(value))
Now the logic of HTTP request is abstracted away! Cheers!
Documentation coming soon...
Documentation coming soon...
Copyright (c) 2024-present, Artem Tarasenko
FAQs
Unknown package
We found that @api-def/provider-http demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.