Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Created August 24, 2012 12:40
Show Gist options
  • Save benigumocom/3450112 to your computer and use it in GitHub Desktop.
Save benigumocom/3450112 to your computer and use it in GitHub Desktop.
curlでGCMに投げる(plain text)
#!/bin/sh -x
api_key=your-api_key
registration_id=your-registration_id
curl -v \
--header "Authorization: key=$api_key" \
--header 'Content-Type:application/x-www-form-urlencoded;charset=UTF-8' \
-d registration_id=$registration_id \
-d collapse_key=update \
--data-urlencode data.message='こんにちは GCM!!' \
https://android.googleapis.com/gcm/send
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment