Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestMessage.GetParameter method missing from IRequestMessage interface #941

Closed
ShortIsLong opened this issue May 25, 2023 · 5 comments
Closed
Assignees
Labels

Comments

@ShortIsLong
Copy link

ShortIsLong commented May 25, 2023

The RequestMessage.GetParameter method seems to be missing from the IRequestMessage interface. Wasn't sure if this is intentional or an oversight? Thanks.

public WireMockList<string>? GetParameter(string key, bool ignoreCase = false)

public interface IRequestMessage

@StefH
Copy link
Collaborator

StefH commented May 25, 2023

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

Do you need it ?

@StefH StefH self-assigned this May 25, 2023
@ShortIsLong
Copy link
Author

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
Copy link
Collaborator

StefH commented May 25, 2023

Thanks for your explanation.

If you really need it, I'll add this method to the interface.

@StefH StefH added the feature label May 25, 2023
@StefH
Copy link
Collaborator

StefH commented May 25, 2023

#942

@StefH StefH closed this as completed May 25, 2023
@ShortIsLong
Copy link
Author

Thanks for the quick turnaround! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants