class HTTParty::Response

def warn_about_nil_deprecation

def warn_about_nil_deprecation
  trace_line = caller.reject { |line| line.include?('httparty') }.first
  warning = "[DEPRECATION] HTTParty will no longer override `response#nil?`. " \
    "This functionality will be removed in future versions. " \
    "Please, add explicit check `response.body.nil? || response.body.empty?`. " \
    "For more info refer to: https://github.com/jnunemaker/httparty/issues/568\n" \
    "#{trace_line}"
  warn(warning)
end