Method: HTTPX::Channel#send

Defined in:
lib/httpx/channel.rb

#send(request, **args) ⇒ Object



178
179
180
181
182
183
184
185
186
187
# File 'lib/httpx/channel.rb', line 178

def send(request, **args)
  if @error_response
    emit(:response, request, @error_response)
  elsif @parser && !@write_buffer.full?
    request.headers["alt-used"] = @uri.authority if match_altsvcs?(request.uri)
    parser.send(request, **args)
  else
    @pending << [request, args]
  end
end