-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Dynamic querystring! #315
Comments
Isn't this: https://github.com/paulcbetts/refit#form-posts what you want? |
No, mine is a GET request & the parameters are query string parameters |
It shouldn't matter that yours is a GET. If you look at the example it is converted into query string parameters. |
So:
This should give:
|
Thank you, I tried that but no success. |
What does "no success" mean? Does it crash? Does it give a malformatted url? something else? Do you want people to guess? |
No success means I didn't get the desired result!! |
That dictionary support is really for APIs that take form posts (where the data goes in the request body and the content type is We could possibly extend the querystring parameter generation to work with a dictionary though. |
Friends, No comment on this? I really don't have any idea. |
Sorry. I'll try to have a look this weekend. |
Thanks man that would be appreciated, Hope you get back with good news. |
Hey, I've had a quick look into it and I can't see how it's possible without changes. I'll see if I can get a PR together to add support over the next week. I had a look at #252, but I have no idea what it's about. There's no interface in Refit called |
Thank you dear, |
That was my bad. I forgot i switched over to reastease as i needed this same functionality. |
Hi, |
Completely dropped.off the radar, sorry. Will take a look at it this weekend. |
Tnx, I hope you come up with great news 😄 |
Hey @bennor |
Not yet. Too much going on in the rest of my life. I should be able commit to having it completed by mid September. Sorry to string you along. |
Tnx buddy |
If you change control over the API you could change it to accept a form post and use the form body serialization method. Otherwise you'll need to provide static versions of the parameters. Can you make some optional? |
I don't have control over the api unfortunately. Also static parameters can't help me, because I have some sort of array in parameters like below: |
Any update when we might see this? I have a similar problem where I cannot control the api. Things get further complicated when its a multipart request with additional form data. I found the api will accept the items as query string parameters but one of the two I need to pass is a dynamic value. A workaround till the Query attribute is available would be helpful if anyone has figured that out? |
Hi, any update of this? |
Closing as outdated, please update to the latest version, thank you. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
I've got an endpoint which has about 15 query string parameters for filtering purposes. As they are optional parameters, there will be a lot of parameter combination so overloads are useless and Also I should avoid setting null-value parameters as it does affect on the result.
I searched a little seems implementing
IUrlParameterFormatter
is the answer, but I don't have any idea of how to.Would somebody guide me on this?!
Thanks
Ramin
The text was updated successfully, but these errors were encountered: