parent
43c7539137
commit
6c34d4a404
|
|
@ -27,9 +27,9 @@ export const fetchPage = (
|
|||
};
|
||||
|
||||
export const fetchPageError = (payload: ResponseMeta) => {
|
||||
console.log("FETCH PAGE ERROR", payload);
|
||||
return {
|
||||
type: ReduxActionTypes.FETCH_PAGE_ERROR,
|
||||
payload,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import { ContentType, DataType } from "../constants/ApiConstants";
|
||||
import { ContentType, EncodingType } from "../constants/ApiConstants";
|
||||
|
||||
export interface APIHeaders {
|
||||
Accept?: ContentType;
|
||||
"Content-Type"?: ContentType;
|
||||
dataType?: DataType;
|
||||
Origin?: string;
|
||||
"Content-Type": ContentType;
|
||||
"Accept-Encoding": EncodingType;
|
||||
}
|
||||
|
||||
export interface APIRequest {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { APIHeaders } from "../api/ApiRequests";
|
||||
|
||||
export type DataType = "json" | "xml";
|
||||
export type ContentType =
|
||||
| "application/json"
|
||||
| "application/x-www-form-urlencoded";
|
||||
|
|
@ -13,8 +12,8 @@ export const STAGE_BASE_URL = "https://appsmith-test.herokuapp.com";
|
|||
export const BASE_URL = STAGE_BASE_URL;
|
||||
export const REQUEST_TIMEOUT_MS = 2000;
|
||||
export const REQUEST_HEADERS: APIHeaders = {
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Accept-Encoding": "gzip",
|
||||
};
|
||||
|
||||
export interface APIException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user