Skip to content

Correct type of request not recognized when using withCookies and withContent #19

Description

@RicardoViteriR

I have the following function that I cannot get to recognize the request when using the withCookies and withContent middleware.

I tried using import { Request as IttyRequest} from 'itty-router' but I get Property 'content' does not exist on type 'Request'

export async function handleRefresh(req: any): Promise<Response> {
  const payload: RefreshTokenData = req.content ?? {};
}

Can someone tell me how I can get the right type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions