Axios Flashcards

(2 cards)

1
Q

What is the syntax for making an asynchronous Axios request?

A
async functionName() {
    const config = {
        ...
    }
}
const res = await axios.get('https://path.to.resource.com');
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Using Axios, how do you access the response data from a request?

A

res.data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly