Created
November 4, 2020 21:37
-
-
Save iam-vipul/feb8f2c3867ef1a55f2bffeb5102fdcd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const apiUrl = "http://localhost:1337/home-page"; | |
| const headers = { "Content-Type": "application/json" }; | |
| axios({ | |
| url: apiUrl, | |
| headers: headers, | |
| method: "GET", | |
| }) | |
| .then((response) => { | |
| this.data_property = response.data | |
| }) | |
| .catch((err) => { | |
| console.log(err); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment