Skip to content
Discussion options

You must be logged in to vote

You should just install axios: npm add axios

Then write code like this:

<script setup>
import axios from "axios";

function callapi() {
    axios.post("https://XXXX.ap-southeast-2.amazonaws.com/v1/XXXX")
    .then(response => {
        console.log(response.data);
    }).catch(error => console.error(error));
}
</script>

<button @click="callapi()">Test Button</button>

Basically you'll need to write vue code.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@robnewport
Comment options

@brc-dd
Comment options

@robnewport
Comment options

Answer selected by robnewport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants