Skip to content

Commit 3357a78

Browse files
authored
Merge branch 'dev' into feature/version-increment
2 parents 0cef256 + 6696aec commit 3357a78

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/microsoft/graph/content/MSBatchRequestContent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ private JsonObject getBatchRequestObjectFromRequestStep(final MSBatchRequestStep
118118
contentmap.add("id", new JsonPrimitive(batchRequestStep.getRequestId()));
119119

120120
final String url = batchRequestStep.getRequest().url().toString()
121-
.replaceAll("https://graph.microsoft.com/v1.0/", "").replaceAll("http://graph.microsoft.com/v1.0/", "")
122-
.replaceAll("https://graph.microsoft.com/beta/", "").replaceAll("http://graph.microsoft.com/beta/", "");
121+
.replaceAll("(?i)^http[s]?:\\/\\/graph\\.microsoft\\.com\\/(?>v1\\.0|beta)\\/?", ""); // (?i) case insensitive
123122
contentmap.add("url", new JsonPrimitive(url));
124123

125124
contentmap.add("method", new JsonPrimitive(batchRequestStep.getRequest().method().toString()));

0 commit comments

Comments
 (0)