@ -32,6 +32,7 @@ export default async function handler(req, res) {
}
req.method = mapping?.method || "GET";
if (mapping?.body) req.body = mapping?.body;
req.query.endpoint = endpoint;
if (req.query.segments) {
@ -27,10 +27,15 @@ export default async function genericProxyHandler(req, res, map) {
};
const [status, contentType, data] = await httpProxy(url, {
const params = {
method: req.method,
headers,
});
if (req.body) {
params.body = req.body;
const [status, contentType, data] = await httpProxy(url, params);
let resultData = data;