openapi-ts icon indicating copy to clipboard operation
openapi-ts copied to clipboard

Make MSW and @hey-api/client-fetch talk together

Open BjorneOma opened this issue 5 months ago • 10 comments

Description

Hey! Thanks for this project! I am using it in my new remix app and finding it very useful :)

I am trying to get the fetch-client and msw to talk together. Msw is client-agnostic and should work with any kind of http requests. Before I used @hey-api/client-fetch (and the functions generated in services.gen.ts) msw had no issues intercepting the requests and retuning mock data, but now I get this error: image

I am using msw on the server side of my remix app since all my api calls go through it.

Could I be doing something wrong or are msw and @hey-api/client-fetch just not compatible?

Versions: msw: 2.3.4 @hey-api/openapi-ts: 0.53.0 @hey-api/client-fetch: 0.2.4

BjorneOma avatar Oct 01 '24 10:10 BjorneOma