Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Rest Client Frameworks

Tags:

rest

.net

http

I'm looking for the best .NET C# framework for building a REST Http client. My requirements are as follows:

  • Unit testable (mockable)
  • Supports multi-part form and file uploads

I have looked at Hammock, but it is lacking in documentation and seems to be troublesome when attempting to mock file uploads.

Any suggestions, please?

like image 246
epoch Avatar asked Nov 01 '10 22:11

epoch


People also ask

Does .NET use REST API?

ASP.NET makes it easy to build services that reach a broad range of clients, including browsers and mobile devices. With ASP.NET you use the same framework and patterns to build both web pages and services, side-by-side in the same project.

Is RestSharp better than HttpClient?

The main conclusion is that one is not better than the other, and we shouldn't compare them since RestSharp is a wrapper around HttpClient. The decision between using one of the two tools depends on the use case and the situation.

What is the difference between Restclient and HttpClient?

HTTP client is a client that is able to send a request to and get a response from the server in HTTP format. REST client is a client that is designed to use a service from a server and this service is RESTful.

What is .NET RESTful?

RESTful is not a new term. It refers to an architectural style where web services receive and send data from and to client apps. The goal of these applications is to centralize data that different client apps will use.


1 Answers

There is also RestSharp. I've inherited it on some projects and haven't fully explored it myself, so I'm afraid I cannot say if it meets your requirements.

The developer of RestSharp is active in the .Net community, so if the published documentation doesn't cover something I would say there is a good chance of getting some assistance.

like image 172
quentin-starin Avatar answered Oct 21 '22 20:10

quentin-starin