blueberryapps / vcr.js

Mock server with Proxy and Record support inspired by ruby VCR.
MIT License
41 stars 7 forks source link

Improvements #21

Open imtoo opened 6 years ago

imtoo commented 6 years ago
ondrejbartas commented 6 years ago

@imtoo delays I want for long time to have. It can be easily done by middleware. Idea was to set some variant with modifier that will trigger delay. Also it would be great about 503 or similar states.

Mixture - you can use proxy server and when response is not found in fixtures it will do real call to api. If you ommit default variant in fixtures it should do call to api, if you set different variant and it exists it will use fixture

Changing response - please make it more clear

Pretiffier? It can be done also as middleware, but you would need to have correctly set response headers

imtoo commented 6 years ago

Thanks.

Changing response: we need to change response from detox/appium (no cookies). We thought about some http request sent to changeResponse endpoint and it’d change response of the next http request

ondrejbartas commented 6 years ago

@imtoo you can do it by setting variant or is it something else?

ondrejbartas commented 6 years ago

also you can write endpoint.js which will be normal express endpoint which can store in context of file some variables