@reservation-studio/electron-types
Version:
TypeScript типове за ReservationStudioElectron
39 lines (38 loc) • 1 kB
TypeScript
/**
* Interface representing an HTTP response.
*/
export interface HttpResponse {
/**
* The HTTP status code of the response.
*/
status: number;
/**
* The headers returned in the HTTP response as key-value pairs.
*/
headers: Record<string, string>;
/**
* The response data, which can be any type depending on the request.
*/
data: any;
/**
* Flag indicating whether an error occurred during the HTTP request.
*/
error: boolean;
}
/**
* Interface representing options for an HTTP request.
*/
export interface HttpOptions {
/**
* Optional headers to include in the HTTP request, represented as key-value pairs.
*/
headers?: Record<string, string>;
/**
* Optional timeout for the HTTP request, specified in milliseconds.
*/
timeout?: number;
/**
* Optional query parameters to include in the HTTP request, represented as key-value pairs.
*/
params?: Record<string, string>;
}