lib/hackerone/client/resource_helper.rb in hackerone-client-0.15.0 vs lib/hackerone/client/resource_helper.rb in hackerone-client-0.16.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module HackerOne module Client module ResourceHelper def self.included(base) base.extend(self) @@ -12,30 +14,30 @@ ) end def make_put_request(url, request_body:, extract_data: true) response = HackerOne::Client::Api.hackerone_api_connection.put do |req| - req.headers['Content-Type'] = 'application/json' + req.headers["Content-Type"] = "application/json" req.url url req.body = { data: request_body }.to_json end parse_response(response, extract_data: extract_data) end def make_post_request(url, request_body:, extract_data: true) response = HackerOne::Client::Api.hackerone_api_connection.post do |req| - req.headers['Content-Type'] = 'application/json' + req.headers["Content-Type"] = "application/json" req.url url req.body = { data: request_body }.to_json end parse_response(response, extract_data: extract_data) end def make_get_request(url, params: {}, extract_data: true) response = HackerOne::Client::Api.hackerone_api_connection.get do |req| - req.headers['Content-Type'] = 'application/json' + req.headers["Content-Type"] = "application/json" req.url url req.params = params end parse_response(response, extract_data: extract_data)