replace HTTP with curl
This commit is contained in:
parent
81864cf231
commit
64ebecf0c1
@ -1,16 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "net/http"
|
||||
require "json"
|
||||
require "utils/curl"
|
||||
|
||||
module RepologyParser
|
||||
def call_api(url)
|
||||
ohai "- Calling API #{url}" if Homebrew.args.verbose?
|
||||
uri = URI(url)
|
||||
response = Net::HTTP.get(uri)
|
||||
|
||||
ohai "Parsing response" if Homebrew.args.verbose?
|
||||
JSON.parse(response)
|
||||
curl(uri)
|
||||
end
|
||||
|
||||
def query_repology_api(last_package_in_response = "")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user