<@U022JUZM1B9> how did you config verifier to call...
# libpact_ffi-users
t
@Adam Rodger (pact-net) how did you config verifier to call
/pact-messages
endpoint to get messages to verify? it always call to
/
in my case. absolute path will be
<http://my-provider.com/>
conpare to your
<http://your-provider.com/pact-messages>
a
You can set a path on the FFI call 👍
t
do you remember which FFI call is? I would like to know
a
There's both a set provider info call and an add transport call where you can specify a path. You always need to call the provider info one first because that gives you the handle you need for adding more transports
Ideally there'd be a separation between transports and provider info so you can create the handle and set the provider name in one call, then add the transports separately. That would make integrating much easier because otherwise you need loads of conditions in your code
t
I think you are talking about
pactffi_verifier_add_provider_transport
(set protocol to
message
). I think it's clever, I didn't think about this before. Let me try it. Thanks @Adam Rodger (pact-net) 👍
👍 1
a
Yeah the problem is that the set provider info method requires that you supply a transport as well as the actual provider info, so if you're adding more than one transport then the first one needs to call set provider info, and any subsequent ones need to call the method you've referenced there. It's a bit of an annoying interaction model to integrate with because whenever you're adding a transport then you need to know whether it's the first one or not, then call different methods depending on whether it's first or not.
Oh and the argument of set provider info and add transport are in different orders with slightly different meanings facepalm
t
pactffi_verifier_add_provider_transport
work really well to me 🎉 I'm not sure I'm fully understand your problem about order of calling those FFI methods (maybe because I always call
pactffi_verifier_set_provider_info
first so no problem for me?) Anyway, I got another problem with those FFI calls that I asked here https://pact-foundation.slack.com/archives/C02BXLDJ7JR/p1679503099374349. Hope it can help.
This is also a useful information user/contributor want to know, maybe a document for it would be nice (if it's not documented somewhere) FYI @Matt (pactflow.io / pact-js / pact-go)
👍 1
m
Absolutely!
a
Has there been any progress in separating out setting provider info (like the provider name) and adding the transports in FFI? iirc this is a blocker to releasing PactNet with proper v4 support
👋 1
m
hello! Is there a related issue (I know there was a few threads on this and may have missed it)? If you wouldn’t mind raising one, we can get it looked into in the next few weeks