Skip to content

Can't make it work with expo/fetch #2236

Open
@2ico

Description

@2ico

openapi-fetch version

0.13.5

Description

I'm not able to use the fetch implementation from expo:
https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api

It seems like the types are incompatible between the global fetch and expo/fetch.
How can this be fixed?

Reproduction

import { fetch as expoFetch } from "expo/fetch"

export const API = createClient<paths>({ 
  baseUrl: API_URL,
  fetch: expoFetch as unknown as typeof globalThis.fetch
})

Expected result

expoFetch should be used as the fetch implementation.

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi-fetchRelevant to the openapi-fetch library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions