discourse/lib/onebox/engine/json.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
300 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
module Onebox
module Engine
module JSON
private
def raw(http_headers = {})
@raw ||= ::MultiJson.load(URI.parse(url).open(options.merge(http_headers)))
end
def options
{ read_timeout: timeout }
end
end
end
end