Tuesday 16 March 2021

Part 3 : Hello Sample

Let’s create simple example of Web API ‘Hello World’. I’m using Visual Studio 2019 community version and Core 3.1 SDK.
Create Web API project shown below.

Click on Next button, enter proper name for your project and click on Next button.

  Select API template highlighted and click on create button.

Project gets created for Hello Sample.

  Delete above highlighted file from project WeatherForecastController.CS.

Add new controller class with name Hello and write down below highlighted piece of code.

  Run application and type below highlighted URL. Hello message gets printed on browser

From next article for API testing I'm not going to use browser but postman as it is recommended tool for API testing and great advantage. I will show you as we procced with this series.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home