const headers = {
'Content-Type': 'application/json',
Accept: 'application/json',
'correlation-id': requestContextGet('correlationId'),
};
这是我的标题,当我尝试使用邮递员拨打电话时它显示错误。
ERROR: BadRequestError: request size did not match content length
下面的get调用是从一个应用程序到另一个应用程序进行的。 到达应用程序后,它应该进入这个方法
app.use((req, res, next) => {
if (req.is('text/plain')) {
const decoder = new TextDecoder();
const inflatedData = inflate(
new Uint8Array([...base64Decode(req.body)].map((c) => c.charCodeAt(0)))
);
const decodedData = decoder.decode(inflatedData);
req.body = JSON.parse(decodedData);
}
next();
});
但它甚至没有进入这个方法。