generated from Luis/nextjs-python-web-template
added headers for axios requests
This commit is contained in:
committed by
Sara Pervana
parent
29aa17ca7c
commit
1b549549c0
@@ -14,6 +14,11 @@ const ConsumeAction = ({ endpoint }: { endpoint: string }) => {
|
|||||||
url: endpoint,
|
url: endpoint,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
data: null,
|
data: null,
|
||||||
|
withCredentials: true,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
axios(axiosConfig)
|
axios(axiosConfig)
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ const EntityActions = ({ endpointData, rowData }: Props) => {
|
|||||||
url: endpoint,
|
url: endpoint,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
data: null,
|
data: null,
|
||||||
|
withCredentials: true,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
axios(axiosConfig)
|
axios(axiosConfig)
|
||||||
|
|||||||
Reference in New Issue
Block a user