gems: drop Mechanize, HTTParty, and Sinatra gems.
This commit is contained in:
@@ -22,8 +22,8 @@ module Danbooru
|
||||
@http ||=
|
||||
::Danbooru::Http::ApplicationClient.new
|
||||
.timeout(DEFAULT_TIMEOUT)
|
||||
.headers(Danbooru.config.http_headers)
|
||||
.headers("Accept-Encoding" => "gzip")
|
||||
.headers("User-Agent": "#{Danbooru.config.canonical_app_name}/#{Rails.application.config.x.git_hash}")
|
||||
.use(:auto_inflate)
|
||||
.use(:retriable)
|
||||
.use(redirector: { max_redirects: MAX_REDIRECTS })
|
||||
|
||||
@@ -155,7 +155,6 @@ class PixivApiClient
|
||||
|
||||
def api_client
|
||||
http.headers(
|
||||
**Danbooru.config.http_headers,
|
||||
"Referer": "http://www.pixiv.net",
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"Authorization": "Bearer #{access_token}"
|
||||
|
||||
@@ -141,7 +141,7 @@ module Sources
|
||||
# Subclasses should merge in any required headers needed to access resources
|
||||
# on the site.
|
||||
def headers
|
||||
Danbooru.config.http_headers
|
||||
{}
|
||||
end
|
||||
|
||||
# Returns the size of the image resource without actually downloading the file.
|
||||
|
||||
Reference in New Issue
Block a user