Axios’ post()
function supports a data
parameter that becomes the HTTP request body. On the other hand, [axios.get()](https://masteringjs.io/tutorials/axios/get)
does not support this parameter. The 2nd parameter to axios.get()
is the Axios options.
That’s because, while the HTTP spec does not specifically forbid sending a request body with a GET request, older versions of the HTTP spec say that HTTP servers should ignore GET request bodies. So most HTTP services don’t support GET request bodies.
#axios #developer