@@ -8,12 +8,16 @@ import (
88 core "github.com/microsoftgraph/msgraph-sdk-go-core"
99)
1010
11- // ClientOptions is used by the telemetry handler.
12- var ClientOptions = core.GraphClientOptions {
11+ var clientOptions = core.GraphClientOptions {
1312 GraphServiceVersion : "" , //v1 doesn't include the service version in the telemetry header
1413 GraphServiceLibraryVersion : "0.2.0" ,
1514}
1615
16+ // GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware.
17+ func GetDefaultClientOptions () core.GraphClientOptions {
18+ return clientOptions
19+ }
20+
1721// GraphRequestAdapter is the core service used by GraphServiceClient to make requests to Microsoft Graph.
1822type GraphRequestAdapter struct {
1923 core.GraphRequestAdapterBase
@@ -58,7 +62,7 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactory(aut
5862// Returns:
5963// a new GraphRequestAdapter
6064func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient (authenticationProvider absauth.AuthenticationProvider , parseNodeFactory absser.ParseNodeFactory , serializationWriterFactory absser.SerializationWriterFactory , httpClient * nethttp.Client ) (* GraphRequestAdapter , error ) {
61- baseAdapter , err := core .NewGraphRequestAdapterBaseWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient (authenticationProvider , ClientOptions , parseNodeFactory , serializationWriterFactory , httpClient )
65+ baseAdapter , err := core .NewGraphRequestAdapterBaseWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient (authenticationProvider , clientOptions , parseNodeFactory , serializationWriterFactory , httpClient )
6266 if err != nil {
6367 return nil , err
6468 }
@@ -68,5 +72,3 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndH
6872
6973 return result , nil
7074}
71-
72-
0 commit comments