Class: Avmtrf1::RestProvider::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/rest_provider/request.rb

Instance Method Summary collapse

Instance Method Details

#autenticate(username, password) ⇒ Object


12
13
14
# File 'lib/avmtrf1/rest_provider/request.rb', line 12

def autenticate(username, password)
  self.auth = ::OpenStruct.new(username: username, password: password)
end

#header(name, value) ⇒ Object


16
17
18
# File 'lib/avmtrf1/rest_provider/request.rb', line 16

def header(name, value)
  headers[name.to_s] = value
end

#responseObject


20
21
22
# File 'lib/avmtrf1/rest_provider/request.rb', line 20

def response
  ::Avmtrf1::RestProvider::Response.new(build_curl, body_data_proc)
end