Skip to content

Commit cb87e9d

Browse files
author
Caitlin Bales (MSFT)
committed
Replace header version with constant
1 parent 85a806f commit cb87e9d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/com/microsoft/graph/core/Constants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ private Constants() {
1212
public static final String APPID = "app-id";
1313
public static final String USERNAME = "[email protected]";
1414
public static final String PASSWORD = "password";
15+
public static final String VERSION_NAME = "0.1.0";
1516
}

src/main/java/com/microsoft/graph/http/BaseRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.microsoft.graph.options.FunctionOption;
3232
import com.microsoft.graph.options.QueryOption;
3333
import com.microsoft.graph.core.ClientException;
34+
import com.microsoft.graph.core.Constants;
3435
import com.microsoft.graph.options.HeaderOption;
3536
import com.microsoft.graph.options.Option;
3637

@@ -131,7 +132,7 @@ public BaseRequest(final String requestUrl,
131132
}
132133
}
133134
final HeaderOption requestStatsHeader = new HeaderOption(REQUEST_STATS_HEADER_NAME,
134-
String.format(REQUEST_STATS_HEADER_VALUE_FORMAT_STRING, "1.0.0"));
135+
String.format(REQUEST_STATS_HEADER_VALUE_FORMAT_STRING, Constants.VERSION_NAME));
135136
headersOptions.add(requestStatsHeader);
136137
}
137138

0 commit comments

Comments
 (0)