Skip to content

Commit 6fe949c

Browse files
authored
compatible with previous GeneralUtilities.TransformBody (#228)
1 parent f716882 commit 6fe949c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Common/Utilities/GeneralUtilities.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,15 @@ public static string GetHttpResponseLog(string statusCode, HttpHeaders headers,
267267
return GetHttpResponseLog(statusCode, ConvertHttpHeadersToWebHeaderCollection(headers), body, matchers);
268268
}
269269

270-
public static string TransformBody(string inBody, IList<Regex> matchers = null)
270+
public static string TransformBody(string inBody)
271+
{
272+
IList<Regex> matchers = new List<Regex>();
273+
Regex matcher = new Regex("(\\s*\"access_token\"\\s*:\\s*)\"[^\"]+\"");
274+
matchers.Add(matcher);
275+
return TransformBody(inBody, matchers);
276+
}
277+
278+
public static string TransformBody(string inBody, IList<Regex> matchers)
271279
{
272280
if (matchers != null)
273281
{

0 commit comments

Comments
 (0)