Skip to content

Instantly share code, notes, and snippets.

@noncom
Created November 2, 2017 06:24
Show Gist options
  • Select an option

  • Save noncom/35efdad34982292fab6e7a2cea3286af to your computer and use it in GitHub Desktop.

Select an option

Save noncom/35efdad34982292fab6e7a2cea3286af to your computer and use it in GitHub Desktop.
fix
val request: Request =
when (method as String) {
"GET" -> {
Fuel.get("")
}
"POST" -> {
Fuel.post("")
}
else -> Fuel.get("")
// Either.Left(
// CommandFailure(MessageSpecFailure(this, FailureDescriptionSimpleText("<${method}> is not a valid http method")))).bind()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment