http-client icon indicating copy to clipboard operation
http-client copied to clipboard

remove original request from Response

Open avieth opened this issue 3 years ago • 5 comments

Deliver it instead by way of the Manager's response modifier.

See https://github.com/snoyberg/http-client/pull/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 words, it is "less breaky" and easier to adopt.

avieth avatar Jul 18 '22 23:07 avieth

@snoyberg any chance that this will still land. For now, I can deal with always needing a Request when constructing a Response.

However, personally, I would still prefer if I could construct a Response without having to provide the original Request.

sol avatar Mar 19 '25 03:03 sol

Hey @sol, reality is that I don't have much time for maintenance of this library. If you're interested in stepping in as a comaintainer, I'd be happy to add you here and on Hackage.

snoyberg avatar Mar 19 '25 04:03 snoyberg

Hey @sol, reality is that I don't have much time for maintenance of this library. If you're interested in stepping in as a comaintainer, I'd be happy to add you here and on Hackage.

Hey @snoyberg, works for me.

My first priority will be fixing CI, but I will be busy for the rest of the day, so gonna look into it tomorrow.

sol avatar Mar 19 '25 10:03 sol

Great, thanks @sol! I just added you as a collaborator. When you're ready for Hackage access, just let me know which of the packages in this repo you'd like upload rights for and your Hackage username.

snoyberg avatar Mar 19 '25 11:03 snoyberg

@miguelclean does this work for you as an alternative for #464.

sol avatar Mar 26 '25 08:03 sol