spec/support/helpers/api_request_helper.rb in appsignal-2.1.2 vs spec/support/helpers/api_request_helper.rb in appsignal-2.2.0.beta.1
- old
+ new
@@ -7,16 +7,13 @@
:environment => config.env,
:hostname => config[:hostname],
:gem_version => Appsignal::VERSION
},
:headers => {
- "Content-Encoding" => "gzip",
"Content-Type" => "application/json; charset=UTF-8"
}
}
- if body.is_a? Hash
- body = Appsignal::Utils::Gzip.compress(Appsignal::Utils::JSON.generate(body))
- end
+ body = Appsignal::Utils::JSON.generate(body) if body.is_a? Hash
options[:body] = body if body
stub_request(:post, "#{config[:endpoint]}/1/#{path}").with(options)
end
end