Class: Ksql::Connection::Request

Inherits:
Struct
  • Object
show all
Defined in:
lib/ksql/connection/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



5
6
7
# File 'lib/ksql/connection/request.rb', line 5

def body
  @body
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



5
6
7
# File 'lib/ksql/connection/request.rb', line 5

def headers
  @headers
end

#methodObject

Returns the value of attribute method

Returns:

  • (Object)

    the current value of method



5
6
7
# File 'lib/ksql/connection/request.rb', line 5

def method
  @method
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



5
6
7
# File 'lib/ksql/connection/request.rb', line 5

def path
  @path
end

Instance Method Details

#to_paramsArray

Returns the request params

Returns:

  • (Array)

    Request params



11
12
13
# File 'lib/ksql/connection/request.rb', line 11

def to_params
  return method, path, { body: body.to_json, headers: headers.merge(auth_headers) }.compact
end