class HTTP::Connection

def send_request(req)

Returns:
  • (nil) -

Parameters:
  • req (Request) -- Request to send to the server
def send_request(req)
  raise StateError, "Tried to send a request while one is pending already. Make sure you read off the body." if @pending_response
  raise StateError, "Tried to send a request while a response is pending. Make sure you read off the body."  if @pending_request
  @pending_request = true
  req.stream @socket
  @pending_response = true
  @pending_request  = false
end