Is there anyway to configure RedirectHandling in Pact-Net similar to Pact JVM
See original GitHub issueI see there is a configuration to enable/ disable RedirectHandling pact.verifier.enableRedirectHandling
for Provider Verification in Pact JVM. Wondering, if there is similar configuration is Pact Net. Currently, i observe Pact Net verifier tries to handle the redirection when there is 301 status. Wondering, if we can disable such behaviour.
Using PactNet Version=“4.3.0”
From Pact JVM docs:
Issue Analytics
- State:
- Created 8 months ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Issues · pact-foundation/pact-net
Enables consumer driven contract testing, providing a mock service and DSL ... Is there anyway to configure RedirectHandling in Pact-Net similar to Pact...
Read more >Can I create a PACT to run on a different hostname?
It is possible to do (there are standalone mock servers you can run on another machine), but the PactProviderRule always starts a mock...
Read more >Changelog | Pact Docs
4.3.4 - Support branches when publishing Pacts · 048fc2a73 - update changelog for release 4.2. · 101b34ecb - update changelog for release 4.1....
Read more >Contract Testing with Pact.NET - YouTube
In this video we will discuss working with Contract testing using Pact.NET This video is extracted from EA Weekly here ...
Read more >Getting started with Pact and Consumer Driven Contract Testing
So you heard about Pact and want to get started with contract testing? This guide should hopefully get you going in the right...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently there’s no way to configure this, no.
Sorry, I think I wasn’t clear above- I’m advocating not putting the redirect in the contract- since the behaviour you want a contract for (usually) isn’t “redirect the client”, it’s “get a response in the following format”.
Whether or not there is a redirect on the way to that response is an implementation detail.
The same argument applies to the URL- probably the specific URL is an implementation detail, and not something the client is relying on.
Remember that the contract is for recording the behaviour the client relies on, not the behaviour of the provider. Unless the client needs the redirect as part of its logic (which is possible, but unlikely) it’s best to have it invisible from the perspective of the consumer test.