Request and Response


compatibility_date why creating new Request objects would result in an empty object? Using module syntax, trying to create any new requests from within a module results in {} when outputting it to console even with console.log(JSON.stringify(req)) ... bit stumped as this was working just fine before I tried migrating things to Wrangler v3 and updated my compatibility_date ... any ideas?requests is an array of Request objects)...scheduledEvent from a development environment similar to the --test-scheduled flag and hitting the __scheduled route locally?/cdn-cgi/mf/scheduled but I don't believe that's a thing anymore with v3 unfortunately.--test-scheduled flag and hit the __scheduled route at the root of the domain. but once it's pushed to a development environment in CF, you have to wait for the event to trigger so I was hoping we could somehow trigger it manually.declare module "cloudflare:sockets" {
function _connect(
address: string | SocketAddress,
options?: SocketOptions
): Socket;
export { _connect as connect };
}export async function example() {
const endpoints = generateEndpoints() // returns a simple array of string URLs to fetch
let requests = endpoints.map(endpoint => new Request(endpoint, { headers: { cookie } }))
let responses = await Promise.all(requests.map(request => fetch(request).then(r => r.json())))
let data = responses.map(response => processResponse(response['records']))
let records = data.flat(3)
records.forEach(a => {
// Failure is this forEach
})
}