@homebridge-plugins/homebridge-resideo
Version:
The Resideo plugin allows you to access your Resideo device(s) from HomeKit.
30 lines • 1.31 kB
TypeScript
export interface HttpRequestConfig {
headers?: Record<string, string>;
params?: Record<string, string | number | boolean | null | undefined>;
auth?: {
username: string;
password: string;
};
data?: unknown;
responseType?: 'json' | 'text';
}
export interface HttpResponse<T = unknown> {
data: T;
status: number;
headers: Record<string, string | string[] | undefined>;
}
export interface HttpClient {
get: <T = unknown>(url: string, config?: HttpRequestConfig) => Promise<HttpResponse<T>>;
post: <T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig) => Promise<HttpResponse<T>>;
put: <T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig) => Promise<HttpResponse<T>>;
}
export declare class NativeHttpClient implements HttpClient {
private readonly defaults?;
constructor(defaults?: (() => HttpRequestConfig) | undefined);
get<T = unknown>(url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
post<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
put<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
private request;
private mergeConfig;
}
//# sourceMappingURL=http-client.d.ts.map