Add original Request to the Response type.#464
Add original Request to the Response type.#464snoyberg merged 1 commit intosnoyberg:masterfrom miguelclean:miguel/extend_response
Conversation
|
I think I'm on board with this one, and I like the naming. It strongly implies that this is the request before any redirects are followed. Some considerations:
|
|
Thank you for the positive response. I just updated this pull request accordingly, however I'm still not sure if it meets the expectations. In particular I was not sure where to place the |
|
It actually looks perfect to me. Only final request I'd make is to add a comment on |
|
Glad to hear that. I updated the comment on |
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
|
I know this is already released so it's maybe a fool's errand, but I want to propose this alternative implementation which doesn't require having a |
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
Another proposal to get the original Request within
managerModifyResponse.Example usage: