Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Network Programming with C# and .NET Core

You're reading from   Hands-On Network Programming with C# and .NET Core Build robust network applications with C# and .NET Core

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789340761
Length 488 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Sean Burns Sean Burns
Author Profile Icon Sean Burns
Sean Burns
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Section 1: Foundations of Network Architecture FREE CHAPTER
2. Networks in a Nutshell 3. DNS and Resource Location 4. Communication Protocols 5. Packets and Streams 6. Section 2: Communicating Over Networks
7. Generating Network Requests in C# 8. Streams, Threads, and Asynchronous Data 9. Error Handling over the Wire 10. Section 3: Application Protocols and Connection Handling
11. Sockets and Ports 12. HTTP in .NET 13. FTP and SMTP 14. The Transport Layer - TCP and UDP 15. Section 4: Security, Stability, and Scalability
16. The Internet Protocol 17. Transport Layer Security 18. Authentication and Authorization on Networks 19. Caching Strategies for Distributed Systems 20. Performance Analysis and Monitoring 21. Section 5: Advanced Subjects
22. Pluggable Protocols in .NET Core 23. Network Analysis and Packet Inspection 24. Remote Logins and SSH 25. Other Books You May Enjoy

HTTP request formatting

With it being such a common aspect of most modern software projects, it should come as no surprise that generating HTTP requests has been so thoroughly streamlined by the .NET Core standard that it's an absolute breeze to use. We'll be using the HttpClient class to send outbound requests that perfectly mirror the FitnessApp API we just defined in our controller class, so understanding the expected paths and inputs should be a straightforward endeavor. So, with that in mind, let's crack open our FitnessDataStoreClient class and start generating requests.

Creating HttpClient instances

We'll start with the simple read operations in our API, but in order to do that, we'll need to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime