Class: MessageMediaLookups::HttpCallBack

Inherits:
Object
  • Object
show all
Defined in:
lib/message_media_lookups/http/http_call_back.rb

Overview

HttpCallBack allows defining callables for pre and post API calls.

Instance Method Summary collapse

Instance Method Details

#on_after_response(_http_context) ⇒ Object

A controller will call this method after making an HTTP Request.

Parameters:

Raises:

  • (NotImplementedError)


15
16
17
18
# File 'lib/message_media_lookups/http/http_call_back.rb', line 15

def on_after_response(_http_context)
  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. will execute.

Parameters:

  • The (HttpRequest)

    HttpRequest object which the HttpClient

Raises:

  • (NotImplementedError)


8
9
10
11
# File 'lib/message_media_lookups/http/http_call_back.rb', line 8

def on_before_request(_http_request)
  raise NotImplementedError, 'This method needs
    to be implemented in a child class.'
end