Class: Coarnotify::Http::HttpLayer
- Inherits:
-
Object
- Object
- Coarnotify::Http::HttpLayer
- Defined in:
- lib/coarnotify/http.rb
Overview
Interface for the HTTP layer
This defines the methods which need to be implemented in order for the client to fully operate
Direct Known Subclasses
Instance Method Summary collapse
-
#get(url, headers = {}, *args, **kwargs) ⇒ HttpResponse
Make an HTTP GET request to the supplied URL with the given headers.
-
#post(url, data, headers = {}, *args, **kwargs) ⇒ HttpResponse
Make an HTTP POST request to the supplied URL with the given body data, and headers.
Instance Method Details
#get(url, headers = {}, *args, **kwargs) ⇒ HttpResponse
Make an HTTP GET request to the supplied URL with the given headers
args and kwargs can be used to pass implementation-specific parameters
36 37 38 |
# File 'lib/coarnotify/http.rb', line 36 def get(url, headers = {}, *args, **kwargs) raise NotImplementedError end |
#post(url, data, headers = {}, *args, **kwargs) ⇒ HttpResponse
Make an HTTP POST request to the supplied URL with the given body data, and headers
args and kwargs can be used to pass implementation-specific parameters
23 24 25 |
# File 'lib/coarnotify/http.rb', line 23 def post(url, data, headers = {}, *args, **kwargs) raise NotImplementedError end |