Consuming APIs:ResfFul Apis, WebAPIs

26 views
Skip to first unread message

Preguntón Cojonero Cabrón

unread,
Feb 20, 2018, 5:36:07 PM2/20/18
to AltNet-Hispano
Hola gente.


¿Cómo consumir RESTful Apis, WebAPI en C#?








Dos detalles importantes a considera al consumir WebAPIs:





In consuming APIs:

Transient faults handling

In .NET, there are 2 libraries that I enjoy when it comes to handling transient faults: the Transient Fault Handling Application Block (TFHAB) from the Enterprise Library and Polly (https://github.com/App-vNext/Polly)


Defining an HTTP Transient Error Detection Strategy For REST Calls




Wrong usage of the HTTPClient class (in .NET)


In .NET, as Simon Timms described in his article, you have to be careful when using the HTTPClient class. Continuous instantiation and disposal of the HTTPClient object may create a socket exhaustion on your machine and affect performance. Consider reusing the HTTPClient object throughout your calls for better performance.



Saludos gente!!!

Carlos Admirador

unread,
May 31, 2021, 6:01:10 AMMay 31
to AltNet-Hispano
¿Cómo consumir RESTful Apis, WebAPI en C#? Net Framework y Net Core.

Más opciones:

IHttpClientFactory

Flurl
Refit
DalSoft.RestClient


Cuál utilizan? Experiencias?
Reply all
Reply to author
Forward
0 new messages