Module: HttpMonkey::EntryPointFluentInterface
- Included in:
- EntryPoint
- Defined in:
- lib/http_monkey/entry_point.rb
Instance Method Summary collapse
- #basic_auth(user, pass) ⇒ Object
- #digest_auth(user, pass) ⇒ Object
- #set_cookie(cookie) ⇒ Object (also: #set_cookies)
- #with_header(header) ⇒ Object (also: #with_headers)
-
#yield_request {|@request| ... } ⇒ Object
Yields internal HTTPI::Request.
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 |
#set_cookie(cookie) ⇒ Object Also known as:
13 14 15 16 |
# File 'lib/http_monkey/entry_point.rb', line 13 def () @request.headers["Cookie"] = if 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
30 31 32 33 |
# File 'lib/http_monkey/entry_point.rb', line 30 def yield_request yield(@request) if block_given? self end |