Sha256: 08c14abbdb2dd2d1e35b54db1d4720b0bbee12f8033f99e2cc089c6ea2a45d00
Contents?: true
Size: 471 Bytes
Versions: 3
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true require_relative "session" module HTTPX class Session def initialize(options = EMPTY, &blk) @options = self.class.default_options.merge(options) @responses = {} @persistent = @options.persistent wrap(&blk) if blk end def wrap begin prev_persistent = @persistent @persistent = true yield self ensure @persistent = prev_persistent end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
httpx-1.3.4 | lib/httpx/session2.rb |
httpx-1.3.3 | lib/httpx/session2.rb |
httpx-1.3.2 | lib/httpx/session2.rb |