Welcome to mirror list, hosted at ThFree Co, Russian Federation.

http_v2.rb « gitlab « lib « gitlab-http « gems - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8f3ede955308eb4dc1e041524bd49764e7b83518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require_relative "http_v2/configuration"
require_relative "http_v2/patches"
require_relative "http_v2/client"

module Gitlab
  module HTTP_V2
    SUPPORTED_HTTP_METHODS = [:get, :try_get, :post, :patch, :put, :delete, :head, :options].freeze

    class << self
      delegate(*SUPPORTED_HTTP_METHODS, to: ::Gitlab::HTTP_V2::Client)

      def configuration
        @configuration ||= Configuration.new
      end

      def configure
        yield(configuration)
      end
    end
  end
end