Skip to content

Instantly share code, notes, and snippets.

View flippr's full-sized avatar

Josh Stevens flippr

View GitHub Profile
@flippr
flippr / ApiController.groovy
Last active August 29, 2015 14:27 — forked from ace-subido/ApiController.groovy
Basic Mailgun WebHook ReceiverHere's a basic setup of how to validate an authentic POST to your endpoint from Mailgun Routes.
class ApiController {
protected def getConfig() {
getGrailsApplication().config
}
protected def jsonData(data = null, otherData = null) {
([data: data] + (otherData ?: [:])) as JSON
}
protected def renderUnacceptable() {