lib/hackerone/client/resource_helper.rb in hackerone-client-0.13.0 vs lib/hackerone/client/resource_helper.rb in hackerone-client-0.14.0
- old
+ new
@@ -10,9 +10,19 @@
response,
extract_data: extract_data
)
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.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.url url
req.body = { data: request_body }.to_json