Skip to content

Unable to customize URL #274

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

Open
dharamhbtik opened this issue Apr 22, 2025 · 1 comment
Open

Unable to customize URL #274

dharamhbtik opened this issue Apr 22, 2025 · 1 comment

Comments

@dharamhbtik
Copy link

I have migrated my http communication from Refit to this library (WebAPiClientCore) in ny .NET MAUI (.NET 9) mobile app for android.
In Refit we were setting up the UrlParameterFormatter to our custom formatter in which we have converted the object types to string.

Now I can't find such option here in this library.

Also, I have some GET url which contains comma (,) or semi comma (;) but this library is encoding those and because of this, our the API we are calling is throwing 400 bad request.

How to tackle this problem?

@xljiulang
Copy link
Collaborator

By default, the parameter attribute used is PathQueryAttribute, so you can create a CustomQueryAttribute that inherits from PathQueryAttribute and override the SerializeToKeyValues method, and then use CustomQueryAttribute to decorate your parameters.

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

No branches or pull requests

2 participants