Слияние кода завершено, страница обновится автоматически
async putForm<E>(putParam: efRcpConfig.requestBaseParams, cls?: ClassConstructor<E>,
securityCfg?: efRcpConfig.securityCfg): Promise<EfRcpResponse<E>> {
try { // Преобразование запроса
// let jsonStr = JSON.stringify(putParam.query);
if (putParam.headers && !putParam.headers['content-type']) {
putParam.headers['content-type'] = "application/x-www-form-urlencoded";
} else {
putParam.headers = {
'content-type': 'application/x-www-form-urlencoded'
};
}
// Создание запроса
let request =
await EfRcpClientApi.buildRequest(putParam.url, 'PUT', putParam.headers, putParam.cookies, putParam.loadingTxt,
putParam.baseURL, putParam.loading, putParam.loadingColor);
// Передача параметров запроса
// request.content = jsonStr;
if (!putParam.isParams) {
// Преобразование параметров запроса
let form = new rcp.Form(putParam.query as rcp.FormFields);
// Установка содержимого запроса
request.content = form;
}
// Создание ответа
return await EfRcpClientApi.buildResponse<E>(request, cls, securityCfg, putParam.loading);
} catch (e) {
return e;
}
}