-
Notifications
You must be signed in to change notification settings - Fork 432
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
[fuel-jackson] Add Request.body(any: Any) extension method #662
Comments
I don't think I quite understand what you're asking for 😅. I personally think it's great to add project-based extension methods in your project! |
The I'm proposing adding another extension-function, |
Got it. Can you post the extension method in full that you currently use? I think we can add this to all the libraries, if applicable! |
I can do that tomorrow. It's just the standard serialization call though, nothing out of the ordinary. It will work fine with all libraries. |
fun Request.body(any: Any) = body(defaultMapper.writeValueAsString(any)) |
Thanks. We'll probably have to do something like: fun Request.body(data: Any, mapper = defaultMapper) = body(mapper.writeValueAsString(data)) |
That'd be great. |
I'm switching from fuel-gson to fuel-jackson and this is a missing feature where gson has a |
@benjefferies yes, I feel like adding |
@tipsy are you happy to throw a quick PR? I would love to see it added ❤️ |
I tried to clone the project and run it locally, but got an |
Ah it is looking to Android SDK path. |
Why? How is this project related to Android? |
|
I see. Is Android Studio required to run the project? |
No, @kittinunf and I both run IntelliJ (NO Android Studio). |
I can take a look at this if people are busy 🙋 |
Is there any updates on this issue? |
I'd like to be able to make requests like this:
Currently I have an extension method in my project which allows this:
Would be nice if this was a part of the
fuel-jackson
module.The text was updated successfully, but these errors were encountered: