Skip to content

Commit

Permalink
React to changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Jan 9, 2023
1 parent 8740f42 commit d5e79bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/Http/Http.Extensions/src/HttpRequestJsonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ public static class HttpRequestJsonExtensions
JsonTypeInfo jsonTypeInfo,
CancellationToken cancellationToken = default)
{
if (request == null)
{
throw new ArgumentNullException(nameof(request));
}
ArgumentNullException.ThrowIfNull(request);

if (!request.HasJsonContentType(out var charset))
{
Expand Down
5 changes: 1 addition & 4 deletions src/Http/Http.Extensions/src/HttpResponseJsonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ public static Task WriteAsJsonAsync(
string? contentType = default,
CancellationToken cancellationToken = default)
{
if (response == null)
{
throw new ArgumentNullException(nameof(response));
}
ArgumentNullException.ThrowIfNull(response);

response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset;

Expand Down

0 comments on commit d5e79bd

Please sign in to comment.