Created
December 9, 2022 10:02
-
-
Save Prajwalprakash3722/db45e29a0008cc9557ab0949a2a7ebee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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