System.Net.Http.Json 11.0.0-preview.6.26359.118

About

Provides extension methods for System.Net.Http.HttpClient and System.Net.Http.HttpContent that facilitate serialization and deserialization of HTTP requests using System.Text.Json.

Key Features

  • Extension methods for deserializing HTTP response JSON bodies.
  • Extension methods for serializing HTTP request JSON bodies.
  • Extension methods for deserializing JSON from HttpContent instances.

How to Use

using System.Net.Http.Json;

using var client = new HttpClient();

// Get the list of all books
Book[] books = await client.GetFromJsonAsync<Book[]>("https://api.contoso.com/books");

// Send a POST request to add a new book
var book = new Book(id: 42, "Title", "Author", publishedYear: 2023);
HttpResponseMessage response = await client.PostAsJsonAsync($"https://api.contoso.com/books/{book.id}", book);

if (response.IsSuccessStatusCode)
    Console.WriteLine("Book added successfully.");
else
    Console.WriteLine($"HTTP request failed with status code: {response.StatusCode}");

public record Book(int id, string title, string author, int publishedYear);

Main Types

The main types provided by this library are:

  • HttpClientJsonExtensions
  • HttpContentJsonExtensions

Additional Documentation

Feedback & Contributing

System.Net.Http.Json is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.Net.Http.Json.

Packages Downloads
OpenIddict.Client.SystemNetHttp
System.Net.Http integration package for the OpenIddict client services.
142
OpenIddict.Validation.SystemNetHttp
System.Net.Http integration package for the OpenIddict validation services.
140
OpenIddict.Validation.SystemNetHttp
System.Net.Http integration package for the OpenIddict validation services.
141
OpenIddict.Validation.SystemNetHttp
System.Net.Http integration package for the OpenIddict validation services.
147
OpenIddict.Validation.SystemNetHttp
System.Net.Http integration package for the OpenIddict validation services.
148
OpenIddict.Validation.SystemNetHttp
System.Net.Http integration package for the OpenIddict validation services.
152
Refit
The automatic type-safe REST library for Xamarin and .NET
141
Refit
The automatic type-safe REST library for Xamarin and .NET
142
Refit
The automatic type-safe REST library for Xamarin and .NET
143
Refit
The automatic type-safe REST library for Xamarin and .NET
146
Refit
The automatic type-safe REST library for Xamarin and .NET
147
Refit
The automatic type-safe REST library for Xamarin and .NET
148
Refit
The automatic type-safe REST library for Xamarin and .NET
151
Refit
The automatic type-safe REST library for Xamarin and .NET
152
Refit
The automatic type-safe REST library for Xamarin and .NET
154
Refit
The automatic type-safe REST library for Xamarin and .NET
160
Refit
The automatic type-safe REST library for Xamarin and .NET
184

https://go.microsoft.com/fwlink/?LinkID=799421

.NET 10.0

.NET 11.0

  • No dependencies.

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
11.0.0-preview.6.26359.118 7 07/18/2026
11.0.0-preview.5.26302.115 12 06/11/2026
11.0.0-preview.4.26230.115 23 05/13/2026
11.0.0-preview.3.26207.106 34 04/14/2026
11.0.0-preview.2.26159.112 35 03/12/2026
11.0.0-preview.1.26104.118 40 02/11/2026
10.0.10 7 07/19/2026
10.0.9 12 06/11/2026
10.0.8 23 05/13/2026
10.0.7 29 04/21/2026
10.0.6 35 04/14/2026
10.0.5 36 03/13/2026
10.0.4 34 03/12/2026
10.0.3 37 02/11/2026
10.0.2 47 01/13/2026
10.0.1 61 12/13/2025
10.0.0 67 11/12/2025
10.0.0-rc.2.25502.107 79 10/14/2025
10.0.0-rc.1.25451.107 91 09/09/2025
10.0.0-preview.7.25380.108 86 08/14/2025
10.0.0-preview.6.25358.103 106 07/18/2025
10.0.0-preview.5.25277.114 97 06/06/2025
10.0.0-preview.4.25258.110 115 05/17/2025
10.0.0-preview.3.25171.5 127 04/11/2025
10.0.0-preview.2.25163.2 101 04/02/2025
10.0.0-preview.1.25080.5 109 04/02/2025
9.0.18 8 07/18/2026
9.0.17 10 06/10/2026
9.0.16 14 05/13/2026
9.0.15 34 04/14/2026
9.0.14 36 03/12/2026
9.0.13 36 02/11/2026
9.0.12 43 01/13/2026
9.0.11 66 11/12/2025
9.0.10 87 10/14/2025
9.0.9 103 09/09/2025
9.0.8 91 08/05/2025
9.0.7 90 07/09/2025
9.0.6 115 06/12/2025
9.0.5 95 05/17/2025
9.0.4 104 04/11/2025
9.0.3 122 04/02/2025
9.0.2 117 04/02/2025
9.0.1 108 03/31/2025
9.0.0 99 11/14/2024
9.0.0-rc.2.24473.5 101 10/23/2024
9.0.0-rc.1.24431.7 112 09/19/2024
9.0.0-preview.7.24405.7 104 10/23/2024
9.0.0-preview.6.24327.7 107 10/21/2024
9.0.0-preview.5.24306.7 113 09/20/2024
9.0.0-preview.4.24266.19 128 10/21/2024
9.0.0-preview.3.24172.9 117 10/23/2024
9.0.0-preview.2.24128.5 104 10/23/2024
9.0.0-preview.1.24080.9 120 10/23/2024
8.0.1 119 10/21/2024
8.0.0 126 10/21/2024
8.0.0-rc.2.23479.6 109 10/21/2024
8.0.0-rc.1.23419.4 107 10/23/2024
8.0.0-preview.7.23375.6 114 09/20/2024
8.0.0-preview.6.23329.7 113 10/23/2024
8.0.0-preview.5.23280.8 124 09/20/2024
8.0.0-preview.4.23259.5 109 10/23/2024
8.0.0-preview.3.23174.8 121 09/20/2024
8.0.0-preview.2.23128.3 136 09/20/2024
8.0.0-preview.1.23110.8 116 10/23/2024
7.0.1 123 10/21/2024
7.0.0 103 10/21/2024
7.0.0-rc.2.22472.3 108 09/20/2024
7.0.0-rc.1.22426.10 112 10/23/2024
7.0.0-preview.7.22375.6 106 10/21/2024
7.0.0-preview.6.22324.4 110 10/23/2024
7.0.0-preview.5.22301.12 116 10/21/2024
7.0.0-preview.4.22229.4 105 10/23/2024
7.0.0-preview.3.22175.4 116 10/23/2024
7.0.0-preview.2.22152.2 111 09/20/2024
7.0.0-preview.1.22076.8 99 09/20/2024
6.0.2 113 11/14/2024
6.0.1 102 10/21/2024
6.0.0 110 10/21/2024
6.0.0-rc.2.21480.5 110 09/20/2024
6.0.0-rc.1.21451.13 109 10/23/2024
6.0.0-preview.7.21377.19 107 10/21/2024
6.0.0-preview.6.21352.12 111 10/21/2024
6.0.0-preview.5.21301.5 106 10/23/2024
6.0.0-preview.4.21253.7 112 10/23/2024
6.0.0-preview.3.21201.4 101 10/23/2024
6.0.0-preview.2.21154.6 98 10/23/2024
6.0.0-preview.1.21102.12 100 10/21/2024
5.0.0 100 09/20/2024
5.0.0-rc.2.20475.5 118 10/21/2024
5.0.0-rc.1.20451.14 102 10/23/2024
5.0.0-preview.8.20407.11 114 10/21/2024
5.0.0-preview.7.20364.11 115 10/21/2024
5.0.0-preview.6.20305.6 116 10/23/2024
5.0.0-preview.5.20278.1 107 10/23/2024
5.0.0-preview.4.20251.6 119 10/23/2024
5.0.0-preview.3.20214.6 119 09/20/2024
3.2.1 130 10/21/2024
3.2.0 105 10/21/2024
3.2.0-rc1.20217.1 92 10/21/2024
3.2.0-preview5.20210.3 99 10/21/2024
3.2.0-preview3.20175.8 124 09/20/2024