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

Recording feature #100

Open
zzarcon opened this issue May 26, 2016 · 1 comment
Open

Recording feature #100

zzarcon opened this issue May 26, 2016 · 1 comment

Comments

@zzarcon
Copy link
Member

zzarcon commented May 26, 2016

Imagine something like this:

import {Server} from 'kakapo';

const server = new Server();

server.startRecording();

// Later in your app you do as many requests as you want

$.get('/users')
$.post('/user', {name: 'hector'});

// Later you stop recording
server.stopRecording();

So, basically what's gonna happen is, Kakapo will save all the request that has been dispatched while he was recording, the url, the response... all the important info in order to re-create the request later.

Later Kakapo will store internally all that info and automatically will handle the requests and responses the same way as your real backend did it.

It will be also cool something like

const recordedData = server.getRecordedData(); 

//Later in the future...

const otherServer = new Server();

otherServer.loadData(recordedData);

This will basically return an object or a serialized string which represents all the events that has been recordered and you can load them in the future in other apps, or other sessions or different servers, etc, etc

@zzarcon
Copy link
Member Author

zzarcon commented May 26, 2016

@devlucky/kakapo-core Take a look guys, I think it will be also interesting on the Swift side, and not so difficult to implement, of course some api might change depending on the language, etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant