class HTTP::Response::Parser

def add(data)

Returns:
  • (self) -
def add(data)
  # XXX(ixti): API doc of HttpParser::Parser is misleading, it says that
  #   it returns boolean true if data was parsed successfully, but instead
  #   it's response tells if there was an error; So when it's `true` that
  #   means parse failed, and `false` means parse was successful.
  #   case of success.
  return self unless @parser.parse(@state, data)
  raise IOError, "Could not parse data"
end