Class: Fluent::Loadgen::HTTPTarget
- Inherits:
-
Object
- Object
- Fluent::Loadgen::HTTPTarget
- Defined in:
- lib/fluent/loadgen/loader.rb
Overview
json = “???? special? ","id":#{i}”
Instance Method Summary collapse
-
#initialize(uri) ⇒ HTTPTarget
constructor
A new instance of HTTPTarget.
- #post(json) ⇒ Object
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 |