sschneider
02/13/2016, 8:18 PMfun createUser(username: String, password: String, email: String, uuid: UUID, handler: (Boolean) -> Unit) {
val body = listOf("username" to username, "password" to password, "email" to email, "uuid" to uuid)
"/users".httpPost(body).response {request, response, result ->
when(result) {
is Result.Success -> handler(true)
is Result.Failure -> handler(false)
}
}
}