Код: Выделить всё
app.http('doSomething', {
methods: ['GET', 'POST'],
authLevel: 'anonymous',
handler: async (request, context) => {
const data = await request.json(); // hangs here
return { body: JSON.stringify({test:"ok" }) };
}
});
< /code>
Я использую SWA CLI для эмуляции статической среды Azure, с бэкэнд API, запустите, как ниже: < /p>
> swa start --api-location api
Подробнее здесь: https://stackoverflow.com/questions/797 ... -json-data
Мобильная версия