Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Created August 24, 2012 12:38
Show Gist options
  • Save benigumocom/3450105 to your computer and use it in GitHub Desktop.
Save benigumocom/3450105 to your computer and use it in GitHub Desktop.
curlでGCMに投げる(json)
#!/bin/sh -x
api_key=your-api_key
registration_id=your-registration_id
curl -v \
--header "Authorization: key=$api_key" \
--header "Content-Type:application/json" \
-d "{\"registration_ids\": [\"$registration_id\"], \"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