class PredictionIO::Request
This class contains the URI path and query parameters that is consumed by PredictionIO::Connection
for asynchronous HTTP requests.
Attributes
params[R]
Query parameters, or form data.
path[R]
The path portion of the request URI.
Public Class Methods
new(path, params = {})
click to toggle source
Populates the package with request URI path, and optionally query parameters or form data.
# File lib/predictionio/request.rb, line 14 def initialize(path, params = {}) @params = params @path = path end
Public Instance Methods
qpath()
click to toggle source
Returns an URI path with query parameters encoded for HTTP GET requests.
# File lib/predictionio/request.rb, line 20 def qpath "#{@path}?#{URI::encode_www_form(@params)}" end