comparison app/lib/legit_client.rb @ 236:498043313523 legit-client

Support multiple headers
author nanaya <me@nanaya.net>
date Sat, 15 Jul 2023 01:40:31 +0900
parents 7a773720d81f
children 961d362e42c7
comparison
equal deleted inserted replaced
235:4222343d9433 236:498043313523
50 def self.escape_param(param) 50 def self.escape_param(param)
51 CGI.escape JSON.dump(param) 51 CGI.escape JSON.dump(param)
52 end 52 end
53 53
54 def self.fetch(uri) 54 def self.fetch(uri)
55 Net::HTTP.get(URI(uri), $cfg[:headers]) 55 Net::HTTP.get(URI(uri), $cfg[:headers].sample)
56 end 56 end
57 57
58 def self.normalize_entity_media(json) 58 def self.normalize_entity_media(json)
59 ret = {} 59 ret = {}
60 60