mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
RequestMessage.GetParameter method missing from IRequestMessage interface #515
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ShortIsLong on GitHub (May 25, 2023).
Originally assigned to: @StefH on GitHub.
The RequestMessage.GetParameter method seems to be missing from the IRequestMessage interface. Wasn't sure if this is intentional or an oversight? Thanks.
3956cd703b/src/WireMock.Net/RequestMessage.cs (L189)3956cd703b/src/WireMock.Net.Abstractions/IRequestMessage.cs (L14)@StefH commented on GitHub (May 25, 2023):
@ShortIsLong
I think that for now this method is only used internally.
Do you need it ?
@ShortIsLong commented on GitHub (May 25, 2023):
Our codebase is making use of the method to pull query values from the request and then build a response based the provided values. We can cast for now to RequestMessage and call the method that way (although it feels a bit unnecessary maybe?) but if the intent is to eventually make this internal then we'd have to roll our own version which would essentially be the same method. Is there some other mechanism we should be using to build a response based on the request param values rather than using GetParameter() inside the Response.WithBody() method? Apologies if this has been covered elsewhere.
@StefH commented on GitHub (May 25, 2023):
Thanks for your explanation.
If you really need it, I'll add this method to the interface.
@StefH commented on GitHub (May 25, 2023):
https://github.com/WireMock-Net/WireMock.Net/pull/942
@ShortIsLong commented on GitHub (May 25, 2023):
Thanks for the quick turnaround! Much appreciated.