Skip to content

Instantly share code, notes, and snippets.

@ralphbean
Created September 19, 2012 19:09
Show Gist options
  • Select an option

  • Save ralphbean/3751580 to your computer and use it in GitHub Desktop.

Select an option

Save ralphbean/3751580 to your computer and use it in GitHub Desktop.
Try to subscribe to another github users events and fail..
#!/bin/bash
# Subscribe to my own repo's events as me
# This succeeds with a 204.
curl -u "ralphbean" -i \
https://api.github.com/hub \
-F "hub.mode=subscribe" \
-F "hub.topic=https://github.com/ralphbean/pyrasite/events/push" \
-F "hub.callback=http://requestb.in/wxgbx8wx"
# Subscribe to another developer's repo's events as me
# This fails with 422 Unprocessable Entity
curl -u "ralphbean" -i \
https://api.github.com/hub \
-F "hub.mode=subscribe" \
-F "hub.topic=https://github.com/lmacken/pyrasite/events/push" \
-F "hub.callback=http://requestb.in/wxgbx8wx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment