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
class Client | |
def self.post(&block) | |
data = DslData.new | |
Dsl.new(data).instance_eval(&block) | |
# build request with data from dsl calls | |
# and execute request | |
puts "Making a request to #{data.url} with headers #{data.headers}" | |
response = "response" # this would be your http response | |
if rand > 0.5 # response.success? |
OlderNewer