ws2801-client
Version:
A client for the webserver for the WS2801-Pi module.
18 lines (17 loc) • 912 B
TypeScript
import { RequestInit, Response as FetchResponse } from 'node-fetch';
export declare class HttpClient {
private baseUrl;
private apiKey;
constructor(baseUrl: string, apiKey?: string);
setApiKey(apiKey: string): void;
get(route: string, options?: RequestInit): Promise<FetchResponse>;
head(route: string, options?: RequestInit): Promise<FetchResponse>;
post(route: string, options?: RequestInit): Promise<FetchResponse>;
put(route: string, options?: RequestInit): Promise<FetchResponse>;
delete(route: string, options?: RequestInit): Promise<FetchResponse>;
connect(route: string, options?: RequestInit): Promise<FetchResponse>;
options(route: string, options?: RequestInit): Promise<FetchResponse>;
trace(route: string, options?: RequestInit): Promise<FetchResponse>;
patch(route: string, options?: RequestInit): Promise<FetchResponse>;
private buildUrl;
}