lib/lvs/json_service/request.rb in LVS-JSONService-0.4.9 vs lib/lvs/json_service/request.rb in LVS-JSONService-0.5.0
- old
+ new
@@ -20,9 +20,12 @@
uri = URI.parse(service)
req = Net::HTTP::Post.new(uri.path)
req.add_field("X-LVS-Request-ID", options[:request_id])
+ if args.is_a? Hash
+ args["CallerId"] = options[:caller_id]
+ end
req.form_data = { "object_request" => args.to_json }
options[:encrypted] ||= require_ssl?
retries = options[:retries] || 0
hard_retries = 1 # For persistent connection failures