Sha256: 36ae31a0e3b1ad7e8b2339f61904bd064d099d6d373266e2dc28b9549b0c5d4c
Contents?: true
Size: 779 Bytes
Versions: 2
Compression:
Stored size: 779 Bytes
Contents
# ==== RequestHistory # Uses RequestBuilder and remind previous requests # # ==== Example: # # @executor = ::Restfulie::Client::HTTP::RequestHistoryExecutor.new("http://restfulie.com") #this class includes RequestHistory module. # @executor.at('/posts').as('application/xml').accepts('application/atom+xml').with('Accept-Language' => 'en').get.code #=> 200 #first request # @executor.at('/blogs').as('application/xml').accepts('application/atom+xml').with('Accept-Language' => 'en').get.code #=> 200 #second request # @executor.request_history!(0) #doing first request # class Restfulie::Client::Feature::HistoryRequest def execute(flow, request, response, env) resp = flow.continue(request, response, env) request.make_snapshot(request) resp end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
restfulie-1.0.0.beta1 | lib/restfulie/client/feature/history_request.rb |
restfulie-0.1.0.beta1 | lib/restfulie/client/feature/history_request.rb |