Class: MicrosoftGraphCore::GraphClientFactory
- Inherits:
-
Object
- Object
- MicrosoftGraphCore::GraphClientFactory
- Defined in:
- lib/microsoft_graph_core/graph_client_factory.rb
Class Method Summary collapse
- .get_default_http_client(middleware = nil, default_options = [MicrosoftGraphCore::GraphClientOptions.new]) ⇒ Object
- .get_default_middleware ⇒ Object
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, = [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, ) return client end |
.get_default_middleware ⇒ Object
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 |