Method: Lightstreamer::PostRequest.request_body
- Defined in:
- lib/lightstreamer/post_request.rb
.request_body(query) ⇒ String
Returns the request body to send for a POST request with the given options.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/lightstreamer/post_request.rb', line 49 def request_body(query) params = {} query.each do |key, value| next if value.nil? value = value.map(&:to_s).join(' ') if value.is_a? Array params[key] = value end URI.encode_www_form params end |