Sha256: a7c0908347d69ce85c329e07aa684b46199a60e3d37837b6e964fbda0e6af091
Contents?: true
Size: 815 Bytes
Versions: 2
Compression:
Stored size: 815 Bytes
Contents
# frozen_string_literal: true module NseData module HttpClient # Base class for HTTP clients class BaseClient # Initializes a new instance of the BaseClient class. # # @param base_url [String] The base URL for the HTTP client. def initialize(base_url, cache_policy) @base_url = base_url @cache_policy = cache_policy end # Sends a GET request to the specified endpoint. # # @param endpoint [String] The endpoint to send the GET request to. # @raise [NotImplementedError] If the method is not implemented by subclasses. def get(endpoint) raise NotImplementedError, 'Subclasses must implement the get method' end # TODO: Other HTTP methods like post, put, delete can be added here if needed end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nse_data-0.1.1 | lib/nse_data/http_client/base_client.rb |
nse_data-0.1.0 | lib/nse_data/http_client/base_client.rb |