Class: Fluent::Loadgen::HTTPTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/loadgen/loader.rb

Overview

json = “???? special? ","id":#{i}”

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ HTTPTarget

Returns a new instance of HTTPTarget.



10
11
12
13
# File 'lib/fluent/loadgen/loader.rb', line 10

def initialize(uri)
  # uri = URI("http://192.168.62.128:8888/riak.test")
  @uri = uri
end

Instance Method Details

#post(json) ⇒ Object



14
15
16
# File 'lib/fluent/loadgen/loader.rb', line 14

def post json
  Net::HTTP.post_form(@uri, 'json' => json)
end