Skip to content

Commit

Permalink
{Resources} Fix Azure#20407: Fix space being removed from Display Nam…
Browse files Browse the repository at this point in the history
…e parameter

Fixes Azure#20407
  • Loading branch information
RakeshMohanMSFT authored Dec 8, 2022
1 parent d687600 commit 760d986
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ protected async Task<HttpResponseMessage> SendRequestAsync(
{
var contentString = content == null ? string.Empty : content.ToString();
// minify JOSN payload to avoid payload too large error
contentString = Regex.Replace(contentString, @"\r\n?|\n|\t| ", String.Empty);
var obj = JsonConvert.DeserializeObject(contentString);
contentString = JsonConvert.SerializeObject(obj);

using (var httpContent = new StringContent(content: contentString, encoding: Encoding.UTF8, mediaType: "application/json"))
using (var request = new HttpRequestMessage(method: httpMethod, requestUri: requestUri) { Content = httpContent })
{
Expand Down

0 comments on commit 760d986

Please sign in to comment.