@ncodedcode/ncode_react_lib
Version:
ncode react application context library
46 lines (45 loc) • 1.59 kB
TypeScript
import { NCNetworkResponse } from "./NCNetworkResponse";
export declare class NCNetwork {
private network;
private execute;
get(url: string, queryParam?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
post(url: string, requestBody?: {
[key: string]: any;
} | FormData, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
postWithQueryParam(url: string, queryParam?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
put(url: string, requestBody?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
patch(url: string, requestBody?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
delete(url: string, queryParam?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
deleteWithRequestBody(url: string, requestBody?: {
[key: string]: any;
}, header?: {
[key: string]: string;
}, applyCommonHeader?: boolean): Promise<NCNetworkResponse>;
addCommonHeader(key: string, value: string): void;
commonHeaders(): {
[key: string]: string;
};
deleteCommonHeader(key: string): void;
}