Created
June 28, 2016 20:34
-
-
Save evmorov/caafab16ace3fd9093b26aee24b71ee3 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
require 'net/http' | |
url = URI.parse('http://localhost:4567/pizza') | |
req = Net::HTTP::Get.new(url.to_s) | |
res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) } | |
body = res.body | |
abort body if body != 'OK' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment