Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed May 8, 2021
1 parent 1f73215 commit 241c3f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/StrongGrid/Extensions/Internal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,16 @@ internal static async Task<PaginatedResponse<T>> AsPaginatedResponse<T>(this IRe
internal static IRequest WithJsonBody<T>(this IRequest request, T body, bool omitCharSet = false)
{
return request.WithBody(bodyBuilder =>
{
var httpContent = bodyBuilder.Model(body, new MediaTypeHeaderValue("application/json"));

if (omitCharSet && !string.IsNullOrEmpty(httpContent.Headers.ContentType.CharSet))
{
httpContent.Headers.ContentType.CharSet = string.Empty;
}
var httpContent = bodyBuilder.Model(body, new MediaTypeHeaderValue("application/json"));

if (omitCharSet && !string.IsNullOrEmpty(httpContent.Headers.ContentType.CharSet))
{
httpContent.Headers.ContentType.CharSet = string.Empty;
}

return httpContent;
});
return httpContent;
});
}

/// <summary>
Expand Down

0 comments on commit 241c3f4

Please sign in to comment.