Class: CoreLibrary::HttpCallback
- Inherits:
-
Object
- Object
- CoreLibrary::HttpCallback
- Defined in:
- lib/apimatic-core-interfaces/types/http_callback.rb
Overview
HttpCallBack allows defining callables for pre and post API calls. This class should not be instantiated but should be used as a base class for capturing the request and response of an API call.
Instance Method Summary collapse
-
#on_after_response(_http_response) ⇒ Object
A controller will call this method after making an HTTP Request.
-
#on_before_request(_http_request) ⇒ Object
A controller will call this method before making an HTTP Request.
Instance Method Details
#on_after_response(_http_response) ⇒ Object
A controller will call this method after making an HTTP Request.
15 16 17 18 |
# File 'lib/apimatic-core-interfaces/types/http_callback.rb', line 15 def on_after_response(_http_response) raise NotImplementedError, 'This method needs to be implemented in a child class.' end |
#on_before_request(_http_request) ⇒ Object
A controller will call this method before making an HTTP Request.
8 9 10 11 |
# File 'lib/apimatic-core-interfaces/types/http_callback.rb', line 8 def on_before_request(_http_request) raise NotImplementedError, 'This method needs to be implemented in a child class.' end |