Hi, I am trying to upgrade pactnet from 3.0.x to 4...
# pact-net
t
Hi, I am trying to upgrade pactnet from 3.0.x to 4.0.x. I want to specify the port but it seems that PactConfig doesn't have the option anymore. However, the documentation does say that it is possible. How do I specify the port ?
f
you don't need anymore the port for the consumer side, since it gets a new valid one. Why do you want to specify it?
t
I would like to create my client beforehand, therefor I want to specify the url. Is it still possible to do it ?
f
create a Http Client Factory and then use it to create you own client class.
Copy code
var dummyHttpClientFactory = new DummyHttpClientFactory(ctx.MockServerUri);                
var consumer = new ServiceClient(dummyHttpClientFactory);
t
So I suppose that specifying the port is really not possible anymore? But thanks for the suggestion, we'll make it work.
f
yeah
👍 1
but in the ServiceClient you can then point it there, or to a mocked service
it's now on your hands
t
alright thank you
f
You're welcome