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

Support for passing state between requests in same scenario #5

Closed
mhjort opened this issue Nov 27, 2014 · 3 comments
Closed

Support for passing state between requests in same scenario #5

mhjort opened this issue Nov 27, 2014 · 3 comments

Comments

@mhjort
Copy link
Owner

mhjort commented Nov 27, 2014

No description provided.

@mhjort
Copy link
Owner Author

mhjort commented Dec 8, 2014

Release 0.4.0 adds support for context map that is passed through requests.

Example:

(def request1 [user-id context cb]
  (cb user-id (assoc context :some-state "state")))

Now next requests context contains map with key :some-state

@mhjort mhjort closed this as completed Dec 8, 2014
@slipset
Copy link

slipset commented Dec 8, 2014

Would that be

(defn request1 [user-id context cb]
  (cb user-id (assoc context :some-state "state")))

@mhjort
Copy link
Owner Author

mhjort commented Dec 10, 2014

There was a mistake. It should be like this

(def request1 [user-id context cb]
  (cb true (assoc context :some-state "state")))

I improved documentation a bit to make this more clear. My plan is to write a full blown example next to make usage more clear overall.

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