
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@lancercomet/async-request
Advanced tools
Make http requests by using axios in the @Decorator way.
import { Injectable } from '@vert/core'
import { asyncRequestFactory, IAsyncRequestResult } from '@lancercomet/async-request'
import { Account } from '../model'
const AsyncRequest = asyncRequestFactory()
@Injectable()
class UserService {
@AsyncRequest({
url: '/user/v1/data',
onError (error) {
this.toast.error('Failed to fetch user data, please try again.')
this.logger.error('Failed to fetch user data:', error)
}
})
async getUserData (data: { id: number }): Promise<IAsyncRequestResult<Account>> {
return null
}
@AsyncRequest({
url: '/user/v1/data',
method: 'post',
onSuccess (response) {
this.toast.success('User data has been updated.')
},
onError (error) {
this.toast.error('Failed to update user data, please try again.')
this.logger.error('Failed to update user data:', error)
}
})
async updateUserData (data: Account): Promise<IAsyncRequestResult<void>> {
return null
}
constructor (
private toast: Toast,
private logger: Logger
) {
}
}
export {
UserService
}
import { AppComponent, Component } from '@vert/core'
import { UserService } from '../services'
import { Account } from '../model'
@Component
export default class UserPanel extends AppComponent {
private inProcess: boolean = false
private userData: Account = null
private async getUserData (id: number) {
this.inProcess = true
const { data, error } = await this.userService.getUserData({ id })
this.inProcess = false
if (!error) {
this.userData = data
}
}
private async updateUserData () {
this.inProcess = true
await this.userService.updateUserData(this.userData)
this.inProcess = false
}
mounted () {
this.getUserData(this.$route.params.id)
}
constructor (
private userService: UserService
) {
super()
}
}
To be added.
Please check index.d.ts for now.
FAQs
Make http requests by using axios in the @Decorator way.
We found that @lancercomet/async-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.