Created
August 2, 2010 23:26
-
-
Save ssuravarapu/505507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
serve { | |
case "api" :: "user" :: id :: _ Get _ => userDetails(id) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
serve { | |
case "api" :: "user" :: id :: _ XmlGet _ => userDetails(id) | |
case "api" :: "user" :: "add" :: _ XmlPost xml -> _ => addUser(xml) | |
case x => x match { | |
case "api" :: "user" :: "update" :: _ XmlPut xml -> _ => updateUser(xml) | |
case "api" :: "user" :: id :: _ XmlDelete _ => deleteUser(id) | |
case _ => NotFoundResponse("Bad URI") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
serve { | |
case "api" :: "user" :: userId :: "address" :: addrId :: _ XmlGet _ => addressDetails(userId, addrId) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment