-2

In the business logic layer of our ASP.NET Core application, we're sending a POST-Request to an external API using System.Net.Http.HttpClient.

Is the business logic layer considered the wrong place to use classes from System.Net and System.Net.Http? If yes, which layer would be the correct place considering we have a 3-tier architecture (web, business logic, data access)?

dario
  • 2,861
  • 3
  • 15
  • 34

1 Answers1

0

Using http request in a business layer is correct. It is a way to uncouple 2 different applications, or two module of the same application.

To know if there is a better solution you should provide more details of the product you are integrating with. Surely business layer is not always a wrong place, it is not always the better place too!

Lorenzo Isidori
  • 1,809
  • 2
  • 20
  • 31