Class: MicrosoftGraphCore::GraphClientFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/microsoft_graph_core/graph_client_factory.rb

Class Method Summary collapse

Class Method Details

.get_default_http_client(middleware = nil, default_options = [MicrosoftGraphCore::GraphClientOptions.new]) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/microsoft_graph_core/graph_client_factory.rb', line 11

def self.get_default_http_client(middleware=nil, default_options = [MicrosoftGraphCore::GraphClientOptions.new])
	if middleware.nil? then #empty is fine in case the user doesn't want to use any middleware
		middleware = get_default_middleware
	end
	client = MicrosoftKiotaFaraday::KiotaClientFactory.get_default_http_client(middleware, default_options)
	return client
end

.get_default_middlewareObject



6
7
8
9
10
# File 'lib/microsoft_graph_core/graph_client_factory.rb', line 6

def self.get_default_middleware()
	middleware = MicrosoftKiotaFaraday::KiotaClientFactory.get_default_middleware
	middleware << MicrosoftGraphCore::Middleware::TelemetryHandler
	return middleware
end