@eddye68/studio-client
Version:
The AWS service Studio client
27 lines (24 loc) • 808 B
text/typescript
import { BodyInit } from 'undici-types/fetch';
interface IHttpClient {
setBaseUrl(baseUrl: string): void;
getBaseUrl(): string;
setCommonHeaders(headers: Record<string, string>): void;
request(httpMethod: string, path: string, query?: URLSearchParams, body?: any): Promise<any>;
/**
*
* @param url
* @returns
*/
downloadFile(url: string, query?: URLSearchParams): Promise<ArrayBuffer>;
/**
*
* @param body
* @param contentType
* @param ticket
* @param studiobaseUrl
* @param size Optional. The size of the file to upload
* @returns The url to the uploaded file
*/
uploadFile(body: BodyInit, size: number, contentType: string, ticket: string, studiobaseUrl: string): Promise<string>;
}
export type { IHttpClient };