http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 119 forks source link

Feature: Replay the client requests #312

Closed bbros-dev closed 3 years ago

bbros-dev commented 3 years ago

Thanks for all the effort that has gone into this crate and for making it open source.

We're reviewing surf for a use case we didn't see in the doc or examples folders: Replaying the client requests.

Is this currently possible? We saw the documented case showing a case where the server response is loaded to be replayed, but not the corollary.

If not currently possible, would it be within the scope of surf?

jbr commented 3 years ago

This seems like it should be possible but I'm not familiar with an implementation yet. The closest is surf-vcr but that's probably what you're referring to as recording the server response. I believe the same general approach should be applicable to recording the outbound request with sufficient information to replay them

bbros-dev commented 3 years ago

Apologies - wrong repo. I should move it.