Class: CrewAI::HTTP
- Inherits:
-
Object
- Object
- CrewAI::HTTP
- Defined in:
- lib/crewai/http.rb
Constant Summary collapse
- USER_AGENT =
"ruby-crewai/#{VERSION} Ruby/#{RUBY_VERSION}".freeze
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(configuration:) ⇒ HTTP
constructor
A new instance of HTTP.
- #post(path, body) ⇒ Object
Constructor Details
#initialize(configuration:) ⇒ HTTP
Returns a new instance of HTTP.
9 10 11 |
# File 'lib/crewai/http.rb', line 9 def initialize(configuration:) @configuration = configuration end |
Instance Method Details
#get(path) ⇒ Object
13 14 15 |
# File 'lib/crewai/http.rb', line 13 def get(path) request(:get, path, body: nil) end |
#post(path, body) ⇒ Object
17 18 19 |
# File 'lib/crewai/http.rb', line 17 def post(path, body) request(:post, path, body: body) end |