Sha256: 6666657901afa4eb6935b5c9b9855c52e4ccbcaf142be429c93fe5d74e0079d1

Contents?: true

Size: 1.03 KB

Versions: 9

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2017-2024, by Samuel Williams.

require "protocol/http/request"
require "protocol/http/headers"

require_relative "../body/writable"

module Async
	module HTTP
		module Protocol
			# Failed to send the request. The request body has NOT been consumed (i.e. #read) and you should retry the request.
			class RequestFailed < StandardError
			end
			
			# This is generated by server protocols.
			class Request < ::Protocol::HTTP::Request
				def connection
					nil
				end
				
				def hijack?
					false
				end
				
				def write_interim_response(status, headers = nil)
				end
				
				def peer
					if connection = self.connection
						connection.peer
					end
				end
				
				def remote_address
					@remote_address ||= peer.remote_address
				end
				
				def remote_address= value
					@remote_address = value
				end
				
				def inspect
					"#<#{self.class}:0x#{self.object_id.to_s(16)} method=#{method} path=#{path} version=#{version}>"
				end
			end
		end
	end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
async-http-0.82.3 lib/async/http/protocol/request.rb
async-http-0.82.2 lib/async/http/protocol/request.rb
async-http-0.82.1 lib/async/http/protocol/request.rb
async-http-0.82.0 lib/async/http/protocol/request.rb
async-http-0.81.0 lib/async/http/protocol/request.rb
async-http-0.80.1 lib/async/http/protocol/request.rb
async-http-0.80.0 lib/async/http/protocol/request.rb
async-http-0.79.0 lib/async/http/protocol/request.rb
async-http-0.78.0 lib/async/http/protocol/request.rb