def _send(request, domain = @domain, port = @port, ssl = @ssl)
      @logger.debug { "Sending #{request.method} request to #{domain}:#{port}#{request.path}" }
      _response = begin
        http_with_proxy = option(:proxy_host).blank? ? Net::HTTP : Net::HTTP::Proxy(option(:proxy_host), option(:proxy_port), option(:proxy_user), option(:proxy_password))
        http = http_with_proxy.new(domain, port)
        http.read_timeout = option(:read_timeout)
        http.use_ssl = ssl
        http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @ssl_verify_none
        http.start{ |_http| _http.request(request) }
      rescue ::Exception => e
        Struct.new(:body, :message, :code, :header).new(nil, "No Response from Server - #{e.message} for '#{domain}:#{port}#{request.path}'", 500, {})
      end
      response = Itrp::Response.new(request, _response)
      if response.valid?
        @logger.debug { "Response:\n#{JSON.pretty_generate(response.json)}" }
      elsif response.raw.body =~ /^\s*<\?xml/i
        @logger.debug { "XML response:\n#{response.raw.body}" }
      elsif '303' == response.raw.code.to_s
        @logger.debug { "Redirect: #{response.raw.header['Location']}" }
      else
        @logger.error { "Request failed: #{response.message}" }
      end
      response
    end
def _send(request, domain = @domain, port = @port, ssl = @ssl)
      @logger.debug { "Sending #{request.method} request to #{domain}:#{port}#{request.path}" }
      _response = begin
        http_with_proxy = option(:proxy_host).blank? ? Net::HTTP : Net::HTTP::Proxy(option(:proxy_host), option(:proxy_port), option(:proxy_user), option(:proxy_password))
        http = http_with_proxy.new(domain, port)
        http.read_timeout = option(:read_timeout)
        http.use_ssl = ssl
        http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @ssl_verify_none
        http.start{ |_http| _http.request(request) }
      rescue ::Exception => e
        Struct.new(:body, :message, :code, :header).new(nil, "No Response from Server - #{e.message} for '#{domain}:#{port}#{request.path}'", 500, {})
      end
      response = Itrp::Response.new(request, _response)
      if response.valid?
        @logger.debug { "Response:\n#{JSON.pretty_generate(response.json)}" }
      elsif response.raw.body =~ /^\s*<\?xml/i
        @logger.debug { "XML response:\n#{response.raw.body}" }
      elsif '303' == response.raw.code.to_s
        @logger.debug { "Redirect: #{response.raw.header['Location']}" }
      else
        @logger.error { "Request failed: #{response.message}" }
      end
      response
    end
Send a request to ITRP and wrap the HTTP Response in an Itrp::Response
 Guaranteed to return a Response, thought it may be +empty?+