Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Simplify onResponse to remove unneeded promise layers. #86

Merged
merged 1 commit into from Feb 20, 2015
Merged

Simplify onResponse to remove unneeded promise layers. #86

merged 1 commit into from Feb 20, 2015

Conversation

yupinghu
Copy link
Contributor

The wrapper's request function is already asynchronous, and
now that session handling is done earlier in middleware, we
can make requests a bit simpler. I also took the opportunity
to simplify how the response text is formed.

It should be possible to do the same sort of thing for
subscriptions but that will be a separate change.

req.log.error(err, 'Request error.');
return next(new restify.InternalError(err.message));
req.blpSession.request(util.format('//%s/%s', req.query.ns, req.query.service),
req.query.type,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Align parameters

@ericvw
Copy link
Contributor

ericvw commented Feb 20, 2015

Note: Let's not merge this until #83 is landed first.

@ericvw
Copy link
Contributor

ericvw commented Feb 20, 2015

lgtm

@ericlu88
Copy link
Contributor

LGTM too. Will hold off merging until #83 landed.

@ericvw
Copy link
Contributor

ericvw commented Feb 20, 2015

@yupinghu - feel free to squash

The wrapper's request function is already asynchronous, and
now that session handling is done earlier in middleware, we
can make requests a bit simpler. I also took the opportunity
to simplify how the response text is formed.

It should be possible to do the same sort of thing for
subscriptions but that will be a separate change.
ericvw added a commit that referenced this pull request Feb 20, 2015
@ericvw ericvw merged commit bac81a8 into bloomberg:develop Feb 20, 2015
@yupinghu yupinghu deleted the simplify branch February 20, 2015 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants