Using HttpClient to Consume APIs in .NET 5
This course will teach you how to consume APIs with HttpClient in .NET.
What you'll learn
APIs don't need to be difficult. In this course, Using HttpClient to consume APIs in .NET, you’ll learn to integrate your .NET applications with an API. First, you’ll explore HttpClient internals and basic CRUD interaction. Next, you’ll discover how to work with streams, compression and how to cancel requests that are no longer needed. Finally, you’ll learn how to improve the reliability of your requests and how to write unit tests that use HttpClient. When you’re finished with this course, you’ll have the skills and knowledge of using HttpClient needed to integrate your .NET application with an API..
Table of contents
- Version Check 0m
- Coming Up 1m
- Frameworks and Tooling 2m
- Introducing the Demo Application 1m
- Demo - Introducing the Demo Application 5m
- Strategies for Working with DTO Model Classes 3m
- Generating DTO Classes 2m
- Demo - Generating DTO Classes from Visual Studio 7m
- Demo - Generating DTO Classes with NSwagStudio 6m
- Tackling Integration with HttpClient 6m
- Summary 2m
- Coming Up 1m
- Demo - Getting a Resource 11m
- Working with Headers and Content Negotiation 3m
- Demo - Manipulating Request Headers 5m
- Indicating Preference with the Relative Quality Parameter 1m
- Demo - Indicating Preference with the Relative Quality Parameter 3m
- Demo - Working with HttpRequestMessage Directly 3m
- Demo - Creating a Resource 4m
- Setting Request Headers 1m
- Inspecting Content Types 1m
- Demo - Updating a Resource 2m
- Demo - Deleting a Resource 1m
- Demo - Using Shortcuts 2m
- Summary 2m
- Coming Up 1m
- Advantages of Working with Streams 1m
- Using Streams When Reading Data 1m
- Demo - Using Streams When Reading Data 5m
- Improving Memory Use and Performance with HttpCompletionMode 1m
- Demo - Improving Memory Use and Performance with HttpCompletionMode 2m
- Demo - Improving Code Reuse with an Extension Method 2m
- Demo - Testing Performance Improvements When Reading Data 3m
- Using Streams When Sending Data 1m
- Demo - Using Streams When Sending Data 5m
- Using Streams When Sending and Reading Data 0m
- Demo - Combining Streams When Sending and Reading Data 4m
- Demo - Testing Performance Improvements When Sending Data 2m
- On Streaming, Memory Use and Performance 2m
- Demo - Working with Compression 3m
- Summary 2m
- Coming Up 1m
- The Problem with Disposing HttpClient Instances (Part 1) 1m
- Demo - The Problem with Disposing HttpClient Instances 5m
- The Problem with Disposing HttpClient Instances (Part 2) 1m
- Introducing HttpClientFactory 3m
- Demo - Using HttpClientFactory to Manage HttpClient Instances 3m
- Demo - Using Named Instances and Defaults 2m
- Demo - Configuring the Primary Message Handler 2m
- Demo - Using Typed Instances 3m
- Demo - Using Typed Instances with Type-scoped Configuration 1m
- Demo - Extending Typed Instances with Interaction Methods 3m
- Summary 1m
- Coming Up 1m
- Delegating Handler Pattern 1m
- Implementing a Retry Policy 1m
- Demo - Implementing a Retry Policy 8m
- Implementing a Handler for Dealing with Time-outs 1m
- Demo - Implementing a Handler for Dealing with Time-outs 4m
- Other Use Cases for Delegating Handlers 2m
- Using Polly to Improve Interaction with an API 1m
- Summary 1m