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

Include response text and status in handleRequest hook #24

Merged
merged 1 commit into from
Jul 26, 2014

Conversation

opsb
Copy link
Contributor

@opsb opsb commented Jul 26, 2014

I wanted to check the responses that were coming back from pretender. This PR moves the handleRequest hook to after when the response has been generated allowing you to access the response in the hook e.g.

server.handledRequest = function(verb, path, request) {
  console.log({
    verb: verb,
    path: path,
    responseText: request.responseText,
    responseStatus: request.responseStatus
  });
};

trek added a commit that referenced this pull request Jul 26, 2014
Include response text and status in handleRequest hook
@trek trek merged commit fa02e4b into pretenderjs:master Jul 26, 2014
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