Last active
July 16, 2017 13:41
-
-
Save EwanDawson/a65e720ed8ce0c9bc26d816de71ee776 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@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