Trying to Get Started - but samples don't work
See original GitHub issueBug Report
Description
I’m trying to get started with Fuel, but the sample snippets are not working.
To Reproduce
Steps to reproduce the behavior: With Kotlin 1.3 in Intelij, The Quick start snippet:
/"https://httpbin.org/get"
.httpGet()
.responseString { request, response, result ->
when (result) {
is Result.Failure -> {
val ex = result.getException()
}
is Result.Success -> {
val data = result.get()
}
}
}
Gives 2 compile errors:
- Result.Success is marked as a type mismatch for result
- Result.Failure is marked as hidden.
If I remove that code, and replace the responseString lambda with a println, the println nver triggers and a tcpdump shows that no http request was ever sent.
Expected behavior
No compile errors and at least a failure response
Development Machine
Complete the following information if applicable
- OS: Fedora 30
- IDE: IntelliJ
- Fuel version: 2.1.0
- Kotlin version: 1.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
If Logic Pro isn't working - Apple Support
Learn what to do if Logic Pro won't open, you can't play or record in a project, or you're having another issue.
Read more >Product Sampling: Tips To Encourage Repeat Orders (2022)
Product sampling is the process of giving free samples away to customers. The idea is, once they try the product for free, they'll...
Read more >Create YouTube Shorts with sampled content - Google Help
Go to the video that you want to sample. Under the video player, tap Create and then Sound . If you upload a...
Read more >3.2.2 Probability sampling - Statistique Canada
Statistics: Power from Data! is a web resource that was created in 2001 to ... Then, draw out 10 titles and you will...
Read more >Load or unload a template or add-in program - Microsoft Support
Control which add-ons and templates are available for your documents. ... If the template or add-in you want does not appear in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup that works! Thanks! Sorry about that. Might I suggest though that a synchronous example be added to the docs? I thought that by not including the coroutines package, that I was disabling asynch.
No need to be sorry! @mbidewell Thanks for using the library though! Also, if you like to help us, you can send a PR as well (only improving the doc is more than perfect, to be honest, we want to help you and others have a pleasant time using our library). Cheers! 🍺