Sha256: dd62bcb5539d5c31c493273623cde6e3c0af12afca202dd0b805e0ae179e25ed
Contents?: true
Size: 1.19 KB
Versions: 9
Compression:
Stored size: 1.19 KB
Contents
module GenesisRuby module Network module Adapter # Base Network Adapter Class class BaseAdapter # Response body is plain string received from the server # Response header is hash with the received headers from the server attr_accessor :response_body, :response_headers # Retrieve HTTP Response Status Code def status raise NotImplementedError, 'Status method must be implemented' end # Prepare the Request # Return the adapter library request object def prepare_request(data) raise NotImplementedError, 'Prepare Request Body method must be implemented' end # Execute the request # Return the adapter library response object def execute raise NotImplementedError, 'Execute method must be implemented' end # Whether the response is an error (HTTP Code != 200) def error? raise NotImplementedError, 'Error? method must be implemented' end # Response server message def server_message raise NotImplementedError, 'Server Message method must be implemented' end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems