Class: LucidHttp::Client
- Inherits:
-
Object
- Object
- LucidHttp::Client
- Defined in:
- lib/lucid_http.rb
Instance Method Summary collapse
- #base_url ⇒ Object
- #do_verb(verb:, path:, formatter:, follower:, form:) ⇒ Object
-
#initialize(base_url: ENV.fetch("LUCID_HTTP_BASE_URL")) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(base_url: ENV.fetch("LUCID_HTTP_BASE_URL")) ⇒ Client
Returns a new instance of Client.
21 22 23 |
# File 'lib/lucid_http.rb', line 21 def initialize(base_url: ENV.fetch("LUCID_HTTP_BASE_URL")) LucidHttp.base_url = base_url end |
Instance Method Details
#base_url ⇒ Object
25 26 27 |
# File 'lib/lucid_http.rb', line 25 def base_url LucidHttp.base_url end |
#do_verb(verb:, path:, formatter:, follower:, form:) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/lucid_http.rb', line 39 def do_verb(verb:, path:, formatter:, follower:, form:) LucidHttp::Response.new( base_url: base_url, path: path, verb: verb, formatter: formatter, follower: follower, form: form, ) end |