在下面我得到一个错误...`ReferenceError:未定义FormData 在对象上。
我不确定自己在这里丢失了什么,因为它看起来对我来说是正确的。
export const setFlightAwareAlert = functions.https.onRequest(async (request, response) => {
const body: {[key: string]: any} = request.body;
const data = new FormData();
Object.keys(body).forEach(key => data.append(key, body[key]));
const alert_id = await axios.post(urls.setAlert, data, {
headers: {
'Authentication': `Basic ${btoa(`${FlightAwareCredentials.user}${FlightAwareCredentials.password}`)}`,
},
withCredentials: true
});
response.status(alert_id.status);
response.json(alert_id.data);
});