Skip to content

Commit

Permalink
chore: Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Mar 6, 2020
1 parent f010b74 commit c5a37c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/influxdb2/client/default_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def initialize(options:)

def _post_json(payload, uri, headers: {})
_check_arg_type(:headers, headers, Hash)
_post(payload, uri, headers: headers.merge({HEADER_CONTENT_TYPE => 'application/json'}))
_post(payload, uri, headers: headers.merge(HEADER_CONTENT_TYPE => 'application/json'))
end

def _post_text(payload, uri, headers: {})
_check_arg_type(:headers, headers, Hash)
_post(payload, uri, headers: headers.merge({HEADER_CONTENT_TYPE => 'text/plain'}))
_post(payload, uri, headers: headers.merge(HEADER_CONTENT_TYPE => 'text/plain'))
end

def _post(payload, uri, limit: @max_redirect_count, headers: {})
Expand All @@ -56,7 +56,7 @@ def _post(payload, uri, limit: @max_redirect_count, headers: {})
request = Net::HTTP::Post.new(uri.request_uri)
request['Authorization'] = "Token #{@options[:token]}"
request['User-Agent'] = "influxdb-client-ruby/#{InfluxDB2::VERSION}"
headers.each { |k,v| request[k] = v }
headers.each { |k, v| request[k] = v }

request.body = payload

Expand Down

0 comments on commit c5a37c2

Please sign in to comment.