📅  最后修改于: 2022-03-11 15:01:10.490000             🧑  作者: Mango
async function handleRequest(request) {
const params = {}
const url = new URL(request.url)
const queryString = url.search.slice(1).split('&')
queryString.forEach(item => {
const kv = item.split('=')
if (kv[0]) params[kv[0]] = kv[1] || true
})
console.log(JSON.stringify(params))
return new Response(JSON.stringify(params))