Skip to content

Instantly share code, notes, and snippets.

@Prajwalprakash3722
Created December 9, 2022 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prajwalprakash3722/db45e29a0008cc9557ab0949a2a7ebee to your computer and use it in GitHub Desktop.
Save Prajwalprakash3722/db45e29a0008cc9557ab0949a2a7ebee to your computer and use it in GitHub Desktop.
axios.get(`api.example.com/endpoint`,{
signal: controller.signal,
})
.then((response: any) => {
// handle data
})
.catch(() => {
// handle failure
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment