-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Add naming strategy support when post/put.. an object by url-encoded #912
Comments
Refit just uses Json.NET under the hood, so you can do this already. There's even an example in the README: https://github.com/reactiveui/refit#json-content (Look for
|
it does not wor when post form data(Body attribute was initialized with BodySerializationMethod.UrlEncoded) @bennor |
Ah, apologies. I missed that part of the description. |
Maybe only WebApiClient can help you!
|
Is your feature request related to a problem? Please describe.
When calling Java's rest API (post/put.. an object by url-encoded), we have to add [AliasAs] attribute to each property of the class due to the difference of naming strategy (Java uses Camel, C-Sharp generally uses Pascal). It's a little silly.
Describe the solution you'd like
Can we increase the transformation of naming strategy (like newtonsoft. JSON), or provide an extension interface for us to implement the transformation from object to formdata?
Thanks!!
Describe alternatives you've considered
Maybe you can take 'BodySerializationMethod' as a parameter of 'IcontentSerializer.SerializeAsync' method, and then use newtonsoft.json to complete the transformation of naming strategy (convert object to JObject, and then traverse the properties of JObject)
Describe suggestions on how to achieve the feature
Additional context
The text was updated successfully, but these errors were encountered: