Created
November 16, 2012 12:12
-
-
Save ktkaushik/4086826 to your computer and use it in GitHub Desktop.
broadcast message to faye channel using net/http
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
| def broadcast_message | |
| uri = URI.parse('http://ws.192.168.2.3.xip.io:9292/faye') | |
| message = {:channel => '/devices/location/coordinates/b8de8b239eafb3f7', :data => "this is a test message"} | |
| Net::HTTP.post_form(uri, :message => message.to_json) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment