Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: added captureHost option to RecordSpec#3004

Draft
quintesse wants to merge 1 commit intowiremock:masterfrom
quintesse:capture_host
Draft

feat: added captureHost option to RecordSpec#3004
quintesse wants to merge 1 commit intowiremock:masterfrom
quintesse:capture_host

Conversation

@quintesse
Copy link

Fixes #1288

@quintesse
Copy link
Author

I only created this as a draft PR because even though this (probably) fixes the original issue as defined in #1288 I'm not really happy with this solution.

Why? Because what if somebody says "hey, now I want to add the port number too!" and if that, why not the protocol too? Etc etc. Meaning we we have to keep adding new flags to RecordSpec and keep passing all of them down the call chain into SnapshotStubMappingGenerator and RequestPatternTransformer.

So I'm wondering if it would not be a better option to have an extension point where a user can provide their own implementation of a SnapshotStubMappingGenerator. Wdyt?

@tomakehurst
Copy link
Member

I think a flag for each is the way to do it, but you could change SnapshotStubMappingGenerator so that it just takes the whole RecordSpec object as a parameter instead of having to unpack the individual attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding the host and protocol to record/playback mode

2 participants