alexliesenfeld / httpmock

HTTP mocking library for Rust
https://httpmock.rs
MIT License
472 stars 42 forks source link

Share variables between requests and responses #49

Closed sr-gi closed 1 year ago

sr-gi commented 3 years ago

I've noticed something missing that would be, IMHO, pretty useful for testing external clients agains mocked servers.

That's sharing variables between requests and responses. For instance, let's say we have a client posting some JSON data to a server, and the server may reply based on that data. The when clause should be able to expose the request data so the then clase can read it and act accordingly.

alexliesenfeld commented 3 years ago

Thanks for creating this issue. This is a great idea. I’m happy to accept a PR.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.