The easiest way to make a GET request with Axios is theaxios.get() function. The first parameter to axios.get() is the URL. For example, below is how you make a GET requestto the URL httpbin.org/get?answer=42:. The 2nd parameter to axios.get() is the Axios options.For example, you don't have to serialize the query string ?answer=42 yourself.
Axios will serializeoptions.params and add it to the query string for you. The below request is equivalent:. The options parameter is also how you set any request headers.
Axios basic API