Home About

All posts tagged with "HttpClient"

The HttpClient is a class used to make HTTP requests and receive HTTP responses. It has methods for all the different HTTP verbs: GET, PUT, POST, DELETE etc

← Newer Posts Page 2 of 2

.Net core HttpClient - how to set content-type for a request

For some reason I can never remember how to make a POST or PUT request with a content-type other than JSON or XML. For JSON and »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, .Net, .Net core, C# 01 February 2020

C# - How to mock the HttpClient for tests when it is a dependency

In this post I will go through how you can mock the HttpClient [https://msdn.microsoft.com/en-us/library/system.net.http.httpclient(v=vs.118) »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, HTTP, C#, Dependency injection, Test doubles, Mocking 11 October 2018
← Newer Posts Page 2 of 2
Rss
Twitter
LinkedIn
profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2022 Cookie policy