Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit f3ba3b8

Browse files
committed
add a gzip middleware exception for httpclient
1 parent d7d2a8f commit f3ba3b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/zendesk_api/client.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module ZendeskAPI
2424
# The top-level class that handles configuration and connection to the Zendesk API.
2525
# Can also be used as an accessor to resource collections.
2626
class Client
27+
GZIP_EXCEPTIONS = [:em_http, :httpclient]
28+
2729
# @return [Configuration] Config instance
2830
attr_reader :config
2931
# @return [Array] Custom response callbacks
@@ -147,7 +149,7 @@ def build_connection
147149

148150
adapter = config.adapter || Faraday.default_adapter
149151

150-
unless [:em_http, Faraday::Adapter::EMHttp].include?(adapter)
152+
unless GZIP_EXCEPTIONS.include?(adapter)
151153
builder.use ZendeskAPI::Middleware::Response::Gzip
152154
builder.use ZendeskAPI::Middleware::Response::Deflate
153155
end

0 commit comments

Comments
 (0)