ar-design
Version:
AR Design is a (react | nextjs) ui library.
49 lines (48 loc) • 1.22 kB
TypeScript
declare class Api {
private _host?;
private _core?;
private _url;
private _init?;
constructor(values: {
host?: string;
core?: string;
init?: RequestInit;
});
Get(values: {
input?: RequestInfo | undefined;
init?: RequestInit;
}): Promise<{
p_response: Promise<Response>;
response: Response;
}>;
Post(values: {
input?: RequestInfo;
data?: any;
init?: Omit<RequestInit, "body">;
}): Promise<{
p_response: Promise<Response>;
response: Response;
}>;
PostWithFormData(values: {
input?: RequestInfo;
data?: FormData;
init?: Omit<RequestInit, "body">;
}): Promise<Response>;
Put(values: {
input?: RequestInfo;
data?: any;
init?: Omit<RequestInit, "body">;
}): Promise<Response>;
Delete(values: {
input?: RequestInfo;
init?: RequestInit;
}): Promise<Response>;
/**
* Burada bir fetch işlemi gerçekleştirilmekte fakat farklı olarak burayı `interceptor` olarak kullanmaktayız.
* @param input
* @param init
* @returns
*/
private CustomFetch;
}
export default Api;