Class: ApiAiWrapper::Components::ExtractorComponent
- Defined in:
- lib/api_ai_wrapper/components/extractor_component.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Component
Instance Method Summary collapse
Instance Method Details
#raise_if_unauthorized ⇒ Object
4 5 6 |
# File 'lib/api_ai_wrapper/components/extractor_component.rb', line 4 def raise ApiAiWrapper::Errors::Engine::MissingToken.new("client token is missing") if self.engine.client_token.blank? end |
#set_headers ⇒ Object
8 9 10 11 12 13 |
# File 'lib/api_ai_wrapper/components/extractor_component.rb', line 8 def set_headers self.engine.headers = { "Authorization" => "Bearer #{self.engine.client_token}", "Content-Type" => "application/json; charset=utf-8" } end |