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

Feature/expose headers and send #11

Merged
merged 2 commits into from
Sep 28, 2015
Merged

Conversation

kilahm
Copy link
Collaborator

@kilahm kilahm commented Sep 15, 2015

This is accomplished by creating a mock request parallel to the current
route being processed. The mock request stores values passed by set()
and send() which are then passed to the function returned by
Route.match().

I would like this functionality because I would like to make sure my wrapper for superagent is setting the correct custom headers and filling in default values for the JSON body.

This PR also renames Route.fn to Route.handler and the callbacks collection to routes. I believe these names more closely align with their purpose in this library. I'm happy to remove the name changes if you don't like them.

@A
Copy link
Owner

A commented Sep 20, 2015

Idea looks pretty nice. But I need time to investigate 'cause changes are major

@kilahm
Copy link
Collaborator Author

kilahm commented Sep 21, 2015

No worries. Take your time to review and I'm happy to answer any questions or make modifications to my PR.

@A
Copy link
Owner

A commented Sep 25, 2015

Ok, LGTM :D @kilahm can you merge conflicts? I'm going to accept PR)

This is accomplished by creating a mock request parallel to the current
route being processed.  The mock request stores values passed by set()
and send() which are then passed to the function returned by
Route.match().
@kilahm kilahm force-pushed the feature/expose_headers_and_send branch from 1caf25f to 90cbb0d Compare September 25, 2015 20:06
@kilahm
Copy link
Collaborator Author

kilahm commented Sep 25, 2015

@shuvalov-anton Should be good to go now! :)

@kilahm
Copy link
Collaborator Author

kilahm commented Sep 28, 2015

@shuvalov-anton you still interested in this? It'd be cool to point my project back to your repo rather than my fork.

A added a commit that referenced this pull request Sep 28, 2015
@A A merged commit 1adeed6 into A:master Sep 28, 2015
@A
Copy link
Owner

A commented Sep 28, 2015

Yay! Sorry for delay. I've had a bunch of work :D

@A
Copy link
Owner

A commented Sep 29, 2015

@kilahm yay! I gonna give you commit rights :D

@A
Copy link
Owner

A commented Oct 6, 2015

@kilahm published with 0.2.0

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

Successfully merging this pull request may close these issues.

2 participants