send headers as part of request headers too for explain query (#816)

This commit is contained in:
Karthik Venkateswaran 2018-10-19 10:50:43 +05:30 committed by Vamshi Surabhi
parent 4f9af70acf
commit bcb3dadf27

View File

@ -233,15 +233,13 @@ const analyzeFetcher = (url, headers) => {
query, query,
}; };
const user = {}; const user = {};
const reqHeaders = getHeadersAsJSON(headers);
user.role = 'admin'; user.role = 'admin';
user.headers = getHeadersAsJSON(headers); user.headers = reqHeaders;
editedQuery.user = user; editedQuery.user = user;
return fetch(`${url}/explain`, { return fetch(`${url}/explain`, {
method: 'post', method: 'post',
headers: { headers: reqHeaders,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(editedQuery), body: JSON.stringify(editedQuery),
credentials: 'include', credentials: 'include',
}); });