RequestMessage.GetParameter method missing from IRequestMessage interface #515

Closed
opened 2025-12-29 15:25:45 +01:00 by adam · 5 comments
Owner

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)

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. https://github.com/WireMock-Net/WireMock.Net/blob/3956cd703b0343686b1e6981aca24b027bfe8545/src/WireMock.Net/RequestMessage.cs#L189 https://github.com/WireMock-Net/WireMock.Net/blob/3956cd703b0343686b1e6981aca24b027bfe8545/src/WireMock.Net.Abstractions/IRequestMessage.cs#L14
adam added the feature label 2025-12-29 15:25:45 +01:00
adam closed this issue 2025-12-29 15:25:46 +01:00
Author
Owner

@StefH commented on GitHub (May 25, 2023):

@ShortIsLong
I think that for now this method is only used internally.

Do you need it ?

@StefH commented on GitHub (May 25, 2023): @ShortIsLong I think that for now this method is only used internally. Do you need it ?
Author
Owner

@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.

@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.
Author
Owner

@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): Thanks for your explanation. If you really need it, I'll add this method to the interface.
Author
Owner

@StefH commented on GitHub (May 25, 2023):

https://github.com/WireMock-Net/WireMock.Net/pull/942

@StefH commented on GitHub (May 25, 2023): https://github.com/WireMock-Net/WireMock.Net/pull/942
Author
Owner

@ShortIsLong commented on GitHub (May 25, 2023):

Thanks for the quick turnaround! Much appreciated.

@ShortIsLong commented on GitHub (May 25, 2023): Thanks for the quick turnaround! Much appreciated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#515