diff --git a/app/jobs/sync_trustie_job.rb b/app/jobs/sync_trustie_job.rb index 89c0b8375..8d92696eb 100644 --- a/app/jobs/sync_trustie_job.rb +++ b/app/jobs/sync_trustie_job.rb @@ -17,9 +17,13 @@ class SyncTrustieJob < ApplicationJob "number": count } uri = URI.parse(url) - http = Net::HTTP.new(uri.hostname, uri.port) - http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'}) - Rails.logger.info("#######_________response__sync__end_____#########") + if token_url.include?("https://") + http.use_ssl = true + end + + + response = http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'}) + Rails.logger.info("#######_________response__sync__end_____#########{response.body}") end end \ No newline at end of file