
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@pendant/api-react
Advanced tools
api-react快速请求 CODING OPEN API
import { setConfig, useFetchApi } from '@pendant/api-react';
setConfig({ clientId: '1234565' });
const ProjectListDemo = () => {
const { response, error } = useFetchApi('DescribeCodingProjects', query);
if (error || response?.Error) {
return <>获取数据错误</>
}
if (response?.Data?.ProjectList instanceof Array) {
return response?.Data?.ProjectList.map(project => <div>{project.Name}<div>)
}
return <>loading</>;
}
export default ProjectListDemo;
设置 api-react 的配置
{
clientId: string;
fetch?: Parameters<typeof fetch>;
}
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| clientId | 客户端 ID | string | - |
| fetch | fetch 的默认参数[RequestInfo | URL, { headers: RequestInit['headers'] }],在发送请求的时候会合并到 参数里面。 | Parameters | - |
函数式使用 fetchApi , hooks 使用 useFetchApi .
fetchApi('DescribeCodingProjects', query).then((res) => console.log(res));
const { response, error } = useFetchApi('DescribeCodingProjects', query);
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| action | 需要调用的业务 id | string | - |
| query | 请求参数 | Object | - |
获取应用的上下文信息
const { accessToken, apiUrl } = await getContext();
FAQs
> TODO: description
We found that @pendant/api-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.