{Skin/Usermenu.htmlload}
Beverly Hills Real Estate

Main Content

Moving From To Florida


   (Go Back) Choose State To Move From ') {
const { method, url, headers, body } = JSON.parse(event.body);
return await fetch(url, {
method,
headers,
body: JSON.stringify(body),
})
.then((res) => res.json())
.then((data) => ({
statusCode: 200,
body: JSON.stringify(data),
}))
.catch((err) => ({
statusCode: 422,
body: String(err),
}));
}

const allowCors = fn => async (req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET,OPTIONS,POST');
res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
if (req.method === 'OPTIONS') {
res.status(200).end();
return;
}
return await fn(req, res);
};

const handleRequest = (req, res) => {
if (req.method === 'POST') {
const { method, url, headers, body } = req.body;
return fetch(url, {
method,
headers,
body: JSON.stringify(body),
})
.then((res) => res.json())
.then((data) => {
res.json(data);
})
.catch((err) => {
res.status(422).json({ err: String(err) });
});
}
res.status(404).json({ err: '404 Not Found' });
};

module.exports = allowCors(handleRequest);

Let's work together
Thank you for your interest in getting in touch with me. Please select the option that suits you the best and fill out the form: