Send json for addFilter request

This commit is contained in:
Ildar Kamalov 2018-10-11 15:27:01 +03:00 committed by Eugene Bujak
parent 4b8ee9ce83
commit 1e18235c1d
1 changed files with 4 additions and 3 deletions

View File

@ -169,10 +169,11 @@ export default class Api {
addFilter(url, name) { addFilter(url, name) {
const { path, method } = this.FILTERING_ADD_FILTER; const { path, method } = this.FILTERING_ADD_FILTER;
const requestBody = `url=${url}&name=${name}`;
const config = { const config = {
data: requestBody, data: {
header: { 'Content-Type': 'text/plain' }, name,
url,
},
}; };
return this.makeRequest(path, method, config); return this.makeRequest(path, method, config);
} }