fix(core): update
This commit is contained in:
parent
e55a521395
commit
7c4227bfc6
@ -72,14 +72,6 @@ export const postFormDataUrlEncoded = async (
|
|||||||
optionsArg: interfaces.ISmartRequestOptions = {},
|
optionsArg: interfaces.ISmartRequestOptions = {},
|
||||||
payloadArg: { key: string; content: string }[]
|
payloadArg: { key: string; content: string }[]
|
||||||
) => {
|
) => {
|
||||||
const requestOptions = {
|
|
||||||
...optionsArg,
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
...optionsArg.headers,
|
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
let resultString = '';
|
let resultString = '';
|
||||||
|
|
||||||
@ -92,7 +84,17 @@ export const postFormDataUrlEncoded = async (
|
|||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const requestOptions: interfaces.ISmartRequestOptions = {
|
||||||
|
...optionsArg,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
...optionsArg.headers,
|
||||||
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
|
requestBody: resultString
|
||||||
|
};
|
||||||
|
|
||||||
// lets fire the actual request for sending the formdata
|
// lets fire the actual request for sending the formdata
|
||||||
const response = await request(`${urlArg}?${resultString}`, requestOptions);
|
const response = await request(urlArg, requestOptions);
|
||||||
return response;
|
return response;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user