![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.
@navalink/request
Advanced tools
Dogesoft 业务请求封装库。
# with npm
npm i @ @navalink/request
# with yarn
yarn add @navalink/request
import $http, { EApiStatus, IResponse } from '@navalink/request';
const refreshTokenOften = async () => {
const result = await $http.post<any, IResponse<any>>(`/api/xxx/xxx`);
if (result.status === EApiStatus.success) {
const data = result.data;
// ...
}
}
某些场景下需要修改 axios 基础配置信息,比如 file-system 会在桌面端环境下使用不同的 url origin。
import { injectCustomization } from '@navalink/request';
injectCustomization({
config: {
baseURL: 'https://xxx.com',
},
});
在一些工程下,需要在每个接口内传递特定参数,比如 doty-roster 2.0 传递 app_id 信息。
import { injectCustomization } from '@navalink/request';
injectCustomization({
baseData: {
app_id: 'app_id value'
}
});
通常,我们会根据后台接口下发的 code 区分做不同处理,比如:登录失效、没有权限等。
import { EApiStatus, injectCustomization } from '@navalink/request';
injectCustomization({
listenResponse: (result, response) => {
if (result.status === EApiStatus.tokenInvalid) {
alert('请重新登录!');
}
}
});
import { injectBaseData } from '@navalink/request';
injectBaseData({
role: 'role',
});
FAQs
Dogesoft 业务请求封装库。
The npm package @navalink/request receives a total of 8 weekly downloads. As such, @navalink/request popularity was classified as not popular.
We found that @navalink/request demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.