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