Content-Type по умолчанию указываем только для POST
This commit is contained in:
parent
6b0ddf2c42
commit
e18080760d
@ -137,17 +137,14 @@ const appProcess = async prms => {
|
|||||||
//Кладём данные контекста в сервис
|
//Кладём данные контекста в сервис
|
||||||
_.extend(prms.service, serviceCtx);
|
_.extend(prms.service, serviceCtx);
|
||||||
//Собираем параметры для передачи серверу
|
//Собираем параметры для передачи серверу
|
||||||
let options = {
|
let options = { method: prms.function.sFnPrmsType, encoding: null };
|
||||||
method: prms.function.sFnPrmsType,
|
|
||||||
encoding: null,
|
|
||||||
headers: { "content-type": "application/octet-stream" }
|
|
||||||
};
|
|
||||||
//Инициализируем параметры ответа сервера
|
//Инициализируем параметры ответа сервера
|
||||||
let optionsResp = {};
|
let optionsResp = {};
|
||||||
//Определимся с URL и телом сообщения в зависимости от способа передачи параметров
|
//Определимся с URL и телом сообщения в зависимости от способа передачи параметров
|
||||||
if (prms.function.nFnPrmsType == objServiceFnSchema.NFN_PRMS_TYPE_POST) {
|
if (prms.function.nFnPrmsType == objServiceFnSchema.NFN_PRMS_TYPE_POST) {
|
||||||
options.url = buildURL({ sSrvRoot: prms.service.sSrvRoot, sFnURL: prms.function.sFnURL });
|
options.url = buildURL({ sSrvRoot: prms.service.sSrvRoot, sFnURL: prms.function.sFnURL });
|
||||||
options.body = prms.queue.blMsg;
|
options.body = prms.queue.blMsg;
|
||||||
|
options.headers = { "content-type": "application/octet-stream" };
|
||||||
} else {
|
} else {
|
||||||
options.url = buildURL({
|
options.url = buildURL({
|
||||||
sSrvRoot: prms.service.sSrvRoot,
|
sSrvRoot: prms.service.sSrvRoot,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user