System.Net.Http.Json 9.0.4

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
Aspose.PDF
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.
30
Aspose.PDF
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.
31
Aspose.PDF
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.
32
Aspose.PDF
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.
33
Aspose.PDF
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.
38
EasyNetQ.Management.Client
A .NET client for the RabbitMQ RESTful management API
36
EasyTool.Core
A open source C# tool to make .NET easy
30
EasyTool.Core
A open source C# tool to make .NET easy
31
EasyTool.Core
A open source C# tool to make .NET easy
35
EasyTool.Core
A open source C# tool to make .NET easy
43
OpenIddict.Client.SystemNetHttp
System.Net.Http integration package for the OpenIddict client services.
30
OpenIddict.Client.SystemNetHttp
System.Net.Http integration package for the OpenIddict client services.
31
OpenIddict.Client.SystemNetHttp
System.Net.Http integration package for the OpenIddict client services.
32
Refit
The automatic type-safe REST library for Xamarin and .NET
30
Refit
The automatic type-safe REST library for Xamarin and .NET
32
Refit
The automatic type-safe REST library for Xamarin and .NET
33
Refit
The automatic type-safe REST library for Xamarin and .NET
34

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

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
10.0.0 0 11/11/2025
10.0.0-rc.2.25502.107 1 10/15/2025
10.0.0-rc.1.25451.107 5 09/15/2025
10.0.0-preview.7.25380.108 8 08/14/2025
10.0.0-preview.6.25358.103 5 08/13/2025
10.0.0-preview.5.25277.114 6 06/08/2025
10.0.0-preview.4.25258.110 7 06/29/2025
10.0.0-preview.3.25171.5 8 06/17/2025
10.0.0-preview.2.25163.2 8 07/09/2025
10.0.0-preview.1.25080.5 10 02/27/2025
9.0.11 0 11/11/2025
9.0.10 2 10/15/2025
9.0.9 4 09/16/2025
9.0.8 4 08/15/2025
9.0.7 6 07/15/2025
9.0.6 5 06/24/2025
9.0.5 5 08/15/2025
9.0.4 7 06/11/2025
9.0.3 6 03/20/2025
9.0.2 8 02/18/2025
9.0.1 8 01/20/2025
9.0.0 12 12/29/2024
9.0.0-rc.2.24473.5 11 11/14/2024
9.0.0-rc.1.24431.7 13 12/29/2024
9.0.0-preview.7.24405.7 12 12/29/2024
9.0.0-preview.6.24327.7 10 12/29/2024
9.0.0-preview.5.24306.7 11 12/29/2024
9.0.0-preview.4.24266.19 11 12/29/2024
9.0.0-preview.3.24172.9 18 05/03/2024
9.0.0-preview.2.24128.5 14 05/11/2024
9.0.0-preview.1.24080.9 11 11/14/2024
8.0.1 10 12/29/2024
8.0.0 10 12/29/2024
8.0.0-rc.2.23479.6 11 04/28/2024
8.0.0-rc.1.23419.4 9 12/29/2024
8.0.0-preview.7.23375.6 8 11/14/2024
8.0.0-preview.6.23329.7 12 12/29/2024
8.0.0-preview.5.23280.8 13 11/14/2024
8.0.0-preview.4.23259.5 12 11/14/2024
8.0.0-preview.3.23174.8 19 04/24/2023
8.0.0-preview.2.23128.3 8 11/14/2024
8.0.0-preview.1.23110.8 9 11/14/2024
7.0.1 11 12/29/2024
7.0.0 111 12/06/2022
7.0.0-rc.2.22472.3 9 12/29/2024
7.0.0-rc.1.22426.10 17 04/28/2024
7.0.0-preview.7.22375.6 9 12/29/2024
7.0.0-preview.6.22324.4 18 04/24/2023
7.0.0-preview.5.22301.12 7 12/29/2024
7.0.0-preview.4.22229.4 9 12/29/2024
7.0.0-preview.3.22175.4 11 12/29/2024
7.0.0-preview.2.22152.2 9 12/29/2024
7.0.0-preview.1.22076.8 9 12/29/2024
6.0.2 13 12/29/2024
6.0.2-mauipre.1.22102.15 10 02/16/2025
6.0.2-mauipre.1.22054.8 7 05/29/2025
6.0.1 10 12/29/2024
6.0.0 21 04/24/2023
6.0.0-rc.2.21480.5 14 05/28/2024
6.0.0-rc.1.21451.13 12 12/29/2024
6.0.0-preview.7.21377.19 12 12/29/2024
6.0.0-preview.6.21352.12 14 12/29/2024
6.0.0-preview.5.21301.5 9 12/29/2024
6.0.0-preview.4.21253.7 8 12/29/2024
6.0.0-preview.3.21201.4 17 04/24/2023
6.0.0-preview.2.21154.6 13 11/14/2024
6.0.0-preview.1.21102.12 11 12/29/2024
5.0.0 14 05/25/2022
5.0.0-rc.2.20475.5 10 12/29/2024
5.0.0-rc.1.20451.14 10 11/14/2024
5.0.0-preview.8.20407.11 12 11/14/2024
5.0.0-preview.7.20364.11 10 12/29/2024
5.0.0-preview.6.20305.6 8 12/29/2024
5.0.0-preview.5.20278.1 9 11/14/2024
5.0.0-preview.4.20251.6 8 12/29/2024
5.0.0-preview.3.20214.6 10 12/29/2024
3.2.1 7 12/29/2024
3.2.0 9 12/29/2024
3.2.0-rc1.20217.1 8 11/14/2024
3.2.0-preview5.20210.3 20 05/02/2024
3.2.0-preview3.20175.8 12 12/29/2024