morpheus-node
Version:
Official Node.js SDK for the Morpheus API Gateway - Connect to the Morpheus-Lumerin AI Marketplace
27 lines • 846 B
TypeScript
/**
* HTTP Client for Morpheus Node SDK
*/
import { RequestOptions } from './types';
export interface HttpClientConfig {
apiKey?: string;
accessToken?: string;
baseURL: string;
timeout: number;
maxRetries: number;
retryDelay: number;
headers?: Record<string, string>;
}
export declare class HttpClient {
private config;
private accessToken?;
constructor(config: HttpClientConfig);
setAccessToken(token: string): void;
private delay;
private shouldRetry;
private getRetryDelay;
request<T>(method: string, path: string, data?: any, options?: RequestOptions): Promise<T>;
private makeRequest;
private handleResponse;
stream(method: string, path: string, data?: any, options?: RequestOptions): AsyncGenerator<string, void, unknown>;
}
//# sourceMappingURL=http-client.d.ts.map