Module: HttpMonkey::EntryPointFluentInterface

Included in:
EntryPoint
Defined in:
lib/http_monkey/entry_point.rb

Instance Method Summary collapse

Instance Method Details

#basic_auth(user, pass) ⇒ Object



19
20
21
22
# File 'lib/http_monkey/entry_point.rb', line 19

def basic_auth(user, pass)
  @request.auth.basic(user, pass)
  self
end

#digest_auth(user, pass) ⇒ Object



24
25
26
27
# File 'lib/http_monkey/entry_point.rb', line 24

def digest_auth(user, pass)
  @request.auth.digest(user, pass)
  self
end


13
14
15
16
# File 'lib/http_monkey/entry_point.rb', line 13

def set_cookie(cookie)
  @request.headers["Cookie"] = cookie if cookie
  self
end

#with_header(header) ⇒ Object Also known as: with_headers



7
8
9
10
# File 'lib/http_monkey/entry_point.rb', line 7

def with_header(header)
  @request.headers.update(header)
  self
end

#yield_request {|@request| ... } ⇒ Object

Yields internal HTTPI::Request

Yields:

  • (@request)


30
31
32
33
# File 'lib/http_monkey/entry_point.rb', line 30

def yield_request
  yield(@request) if block_given?
  self
end