Server to Server

Menu
Menu

API

HttpClient (Server to Server cURL like calls)

cURL is a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. It can be used to make server to server calls. In ASP.net cURL style calls can be made with HttpClient. The following example makes a call to the open Yorkshire Water API.

CONTROLLER: Controllers/HomeController.cs

This could be added to a controller in a MVC application to retrieve the data. This example just re-outputs the endpoint but you may choose to manipulate the data server side.