lib/gitlab/request.rb
def request_defaults(sudo = nil)
      self.class.default_params sudo: sudo
      raise Error::MissingCredentials, 'Please set an endpoint to API' unless @endpoint

      self.class.default_params.delete(:sudo) if sudo.nil?
    end
def request_defaults(sudo = nil)
      self.class.default_params sudo: sudo
      raise Error::MissingCredentials, 'Please set an endpoint to API' unless @endpoint

      self.class.default_params.delete(:sudo) if sudo.nil?
    end
Sets a base_uri and default_params for requests.
 @raise [Error::MissingCredentials] if endpoint not set.