Skip to content

Instantly share code, notes, and snippets.

@hhariri
Last active December 15, 2015 21:59
Show Gist options
  • Save hhariri/5329836 to your computer and use it in GitHub Desktop.
Save hhariri/5329836 to your computer and use it in GitHub Desktop.
resource public fun CustomerResources() {
"/customer" get {
}
"/customer" post {
}
}
resource public fun EmployeeResorces() {
"/employee" get {
}
"/employee" post {
}
}
// if you want to separate even further:
resource public fun CustomerGetResource() {
"/customer" get { .... }
}
resource public fun CustomerPostResource() {
"/customer" post { .... }
}
// if you want to group by objects...
public object CustomerResources {
resource public fun Handlers() {
"/customer" get { .... }
"/customer" post { .... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment