You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-record the requests multiple times with different payloads during development
Re-record the requests every once in a while to stay up-to-date with the real APIs
After recording a request, I may want to apply some refinements to it:
Remove headers like agent and etag
Remove fields from body (leaving the body pattern with a subtree of the original json body)
Change the matcher to partial matcher
Use regex for some fields
Every time I re-record the requests, I need to manually re-apply the refinements. This may get out of hand when the number of requests increases.
For 1., we can use the ExcludedHeaders setting
For 2., perhaps we can add a similar setting for body
For 3. and 4., see the below idea (The idea can be also applied to 1. and 2.)
Can we add support for request transformation (in addition to response transformation)? That is, the ability to define a template that transforms the recorded request (i.e. the .Request object in the mapping json) into the expected request. With that, we re-record the requests without performing any additional steps.
Another option is to have some kind of script for transforming a request after we record it. I believe this may work but it requires a manual step and the above idea sounds like a more streamlined way of doing this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When to re-record requests?
After recording a request, I may want to apply some refinements to it:
Every time I re-record the requests, I need to manually re-apply the refinements. This may get out of hand when the number of requests increases.
For 1., we can use the
ExcludedHeaders
settingFor 2., perhaps we can add a similar setting for body
For 3. and 4., see the below idea (The idea can be also applied to 1. and 2.)
Can we add support for request transformation (in addition to response transformation)? That is, the ability to define a template that transforms the recorded request (i.e. the
.Request
object in the mapping json) into the expected request. With that, we re-record the requests without performing any additional steps.Another option is to have some kind of script for transforming a request after we record it. I believe this may work but it requires a manual step and the above idea sounds like a more streamlined way of doing this.
Beta Was this translation helpful? Give feedback.
All reactions