request abstract method
Executes an HTTP request.
This is the core method that performs the actual HTTP request using the underlying HTTP client library.
Parameters:
request: The request configuration containing URL, method, headers, body, etc.
Returns a Future that completes with an AdapterResponse containing the response data, status code, headers, etc.
Throws AdapterException if the request fails due to timeout, network error, or other issues.
Example:
final request = AdapterRequest(
baseUrl: 'https://api.example.com',
path: '/users/123',
method: HttpMethod.get,
);
final response = await adapter.request(request);
print('Status: ${response.statusCode}');
print('Data: ${response.data}');
Implementation
Future<AdapterResponse> request(AdapterRequest request);