Type of request headers used in the config
Type of request params used in the config
Type of response headers received from the server
Configuration used for the request.
The merged configuration object that was used to make this request, including instance-level settings and request-specific overrides. Useful for debugging and understanding how the request was configured.
HTTP response headers received from the server.
A plain object containing the response headers with type-safe access to headers you've defined in the InstanceResponseHeaders interface. All header names are preserved as-is from the server response.
// Define your response headers
declare module '@logosdx/fetch' {
namespace FetchEngine {
interface InstanceResponseHeaders {
'x-rate-limit': string;
'x-request-id': string;
}
}
}
// Now TypeScript knows about your response headers
const response = await api.get('/users');
const rateLimit = response.headers['x-rate-limit'];
const requestId = response.headers['x-request-id'];
Original request object.
The Request object that was sent to the server, containing the final URL, headers, method, and body after all modifications and merging of instance and request-specific options.
HTTP status code.
The numeric HTTP status code (200, 404, 500, etc.) returned
by the server. Every completed exchange resolves — status alone
decides ok, not a thrown error.
Fields shared by both branches of the FetchResponse union.