This commit is contained in:
Abhinav Jha 2019-09-23 16:44:02 +05:30
parent 43c7539137
commit 6c34d4a404
3 changed files with 5 additions and 8 deletions

View File

@ -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,
};
};

View File

@ -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 {

View File

@ -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 {