Created
January 29, 2012 22:27
-
-
Save johntdyer/1701045 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
| %w(net/http uri).each{|lib| require lib} | |
| # server to send my request to | |
| uri = URI.parse("http://myserver.com/catch_msg") | |
| #create http object | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| #send request | |
| request = Net::HTTP::Get.new(uri.request_uri) | |
| response = http.request(request) | |
| #response code | |
| log "@"*10 + " " + response.code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment