Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch interceptor assumes all Responses are JSON #159

Closed
ahixon opened this issue Nov 27, 2018 · 1 comment
Closed

fetch interceptor assumes all Responses are JSON #159

ahixon opened this issue Nov 27, 2018 · 1 comment

Comments

@ahixon
Copy link

ahixon commented Nov 27, 2018

Fake response will always attempt to serialise to JSON -- see https://github.com/devlucky/Kakapo.js/blob/master/src/interceptors/fetchInterceptor.js#L12

If we want to return, say, a blob of data from a Response, we can never do that. This is useful if you want to return files from mocked endpoints.

Related to, but distinct from, #144

marduke182 pushed a commit to marduke182/Kakapo.js that referenced this issue Apr 10, 2019
zzarcon added a commit that referenced this issue Apr 11, 2019
…ch-response

Solves #159 check content type in fetch response
@zzarcon
Copy link
Member

zzarcon commented Apr 11, 2019

fixed on 3.3.5 🚀

@zzarcon zzarcon closed this as completed Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants