The URL to send the request to.
The HTTP method to use ('GET' or 'POST').
Optional
data: objectThe data to send with the request.
Optional
token: stringThe authentication token to include in the request headers.
The data from the response.
An error if the request fails.
Sends a request to the specified URL.