Skip to content

Instantly share code, notes, and snippets.

@xerial
Created September 23, 2018 03:24
Show Gist options
  • Save xerial/a991f0f6cd1f04b53b552b036f00d431 to your computer and use it in GitHub Desktop.
Save xerial/a991f0f6cd1f04b53b552b036f00d431 to your computer and use it in GitHub Desktop.
case class User(name:String)
trait MyApi {
// Binding http path parameters (e.g., :name) to method arguments
@Endpoint(method = HttpMethod.GET, path = "/user/:name")
def getUser(name: String): User = User(name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment