async function handleRequest(request) {
  try {
    const parsedUrl = new URL(request.url)
    const pathname = parsedUrl.pathname
    const path = normalize_path(pathname)
    const contentType = determine_content_type(path)
    const key = path.startsWith("/") ? path.slice(1) : path
    const body = await STATIC_CONTENT.get(key)

    const res = new Response(body, { status: 200 })
    res.headers.set("Content-type", contentType)
    return res
  } catch (err) {
    console.log(err)
    let res = new Response(err.body, { status: err.status })
    res.headers.set("Content-type", "text/html")
    return res
  }
}
/**
 * Fetch and log a request
 * @param {Request} request
 */
Fetch and log a request
@param {Request} request
Fetch and log a request @param { Request } request
async function handleRequest(request) {
  try {
    const parsedUrl = new URL(request.url)
    const pathname = parsedUrl.pathname
    const path = normalize_path(pathname)
    const contentType = determine_content_type(path)
    const key = path.startsWith("/") ? path.slice(1) : path
    const body = await STATIC_CONTENT.get(key)
    const res = new Response(body, { status: 200 })
    res.headers.set("Content-type", contentType)
    return res
  } catch (err) {
    console.log(err)
    let res = new Response(err.body, { status: err.status })
    res.headers.set("Content-type", "text/html")
    return res
  }
}
async function handleRequest ( request ) { try { const parsedUrl = new URL ( request . url ) const pathname = parsedUrl . pathname const path = normalize_path ( pathname ) const contentType = determine_content_type ( path ) const key = path . startsWith ( "/" ) ? path . slice ( 1 ) : path const body = await STATIC_CONTENT . get ( key ) const res = new Response ( body , { status : 200 } ) res . headers . set ( "Content-type" , contentType ) return res } catch ( err ) { console . log ( err ) let res = new Response ( err . body , { status : err . status } ) res . headers . set ( "Content-type" , "text/html" ) return res } }
Fetch and log a request
 @param {Request} request
Fetch and log a request @param { Request } request