async fetch()

in bindings/akamai/src/index.ts [365:377]


  async fetch(req: EdgeRequest): Promise<EdgeResponse> {
    // Use a relative path, since this is the method for origin redirection used
    // on Akamai.
    let url = new URL(req.url);
    let headers = Object.fromEntries(req.getHeaders().entries());
    let body = (await req.getBodyText()) || undefined;
    return httpRequest(url.pathname + url.query, {
      method: req.method,
      headers,
      body,
      /* there is no timeout in a Fetch API request. Consider making it a member of the Context */
    }).then((v) => new AkamaiResponse(v));
  }