Skip to content

Instantly share code, notes, and snippets.

@EwanDawson
Last active July 16, 2017 13:41
Show Gist options
  • Save EwanDawson/a65e720ed8ce0c9bc26d816de71ee776 to your computer and use it in GitHub Desktop.
Save EwanDawson/a65e720ed8ce0c9bc26d816de71ee776 to your computer and use it in GitHub Desktop.
@Grapes(@Grab("com.jcabi:jcabi-http:1.17.1"))
import com.jcabi.http.request.JdkRequest
import static java.net.URLEncoder.encode
def (title, message) = payload.collect { encode(it).replaceAll("\\+", "%20") }
new JdkRequest("https://api.simplepush.io/send/jzAa6m/${title.toUpperCase()}/$message").fetch()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment