-
Notifications
You must be signed in to change notification settings - Fork 430
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 json request support in router #329
Conversation
@kittinunf is it possible that tests for Seems:
were missing |
Yes, you are right. I am fixing the test in this PR #334. After that was merged, can you please rebase against new master? |
@kittinunf ok, ping me if you notice that I'm missing the merge :) |
#334 It got merged. Can you rebase? And I will be happy to see this PR get merged 👍 🙏
|
fuel/build.gradle
Outdated
@@ -15,6 +15,7 @@ targetCompatibility = JavaVersion.VERSION_1_6 | |||
dependencies { | |||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" | |||
compile "com.github.kittinunf.result:result:$resultVersion" | |||
compile 'org.json:json:20170516' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do we use this somewhere in the core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we need it for tests to manipulate and create a json, dunno why I was not able to get any other access to JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tests? Then, perhaps using testCompile
is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need that to create a JSON object to test sending that as body
val json = JSONObject()
json.put("id", this.value)
json.toString()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, here right?
is GetParamsTest -> {
val json = JSONObject()
json.put("id", this.value)
json.toString()
But it is only in the test right? So you can technically just do testCompile 'org.json:json:20170516'
so that it doesn't forcefully push dependencies to the users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, fixed switching it to testCompile
@kittinunf it seems it is now the Jackson test failing
|
Codecov Report
@@ Coverage Diff @@
## master #329 +/- ##
=========================================
Coverage ? 77.21%
Complexity ? 193
=========================================
Files ? 32
Lines ? 904
Branches ? 148
=========================================
Hits ? 698
Misses ? 131
Partials ? 75
Continue to review full report at Codecov.
|
Ok, now we should have all the stuff in the right place for testing |
Awesome, merging this in. |
I added
body
access to allow this