Recibo el siguiente error en la consola Firebase: la ejecución de la función tomó 60015 ms. Terminado con estado: tiempo de espera.
Aquí está mi función de nube:
exports.test = functions.https.onRequest((req, res) => { cors(req, res, () => { const Number = req.body.Number; return axios.post('https://ws.orias.fr/service?wsdl', getXMLNS(Number), { headers: { 'Content-Type': 'text/xml' }, }, ) .then((res) => { return res.status(200).send(res); }).catch((error) => (error) => { return res.status(500).send(error); }); }); });Y así es como llamo a esta función de nube en mi interfaz ReactJS:
fetch('https://xxx.cloudfunctions.net/test', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ Number: 'xxx', }) }).then(res => res.json()).then(body => alert(JSON.stringify(body)));