summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fake_agent.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fake_agent.rb b/lib/fake_agent.rb
index ac9f5bf..8146582 100644
--- a/lib/fake_agent.rb
+++ b/lib/fake_agent.rb
@@ -21,7 +21,10 @@ class FakeAgent
Dir["**/**/*"].each do |file|
next unless File.file?(file)
url = "#{endpoint}/agents/#{id}/files/#{fingerprint_for(file)}"
- response = Typhoeus.get(url)
+ body = {
+ path: File.expand_path(file)
+ }
+ response = Typhoeus.get(url, body: body)
body = JSON.parse(response.body)
puts body.inspect
case body["state"]