Hi
How to create & consume API using Rest Sharp
Thanks
Hi
How to create & consume API using Rest Sharp
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Mar 14, 2023, 4:28 PM
please share your code if you have any query?
Naimish MakwanaPosted Mar 14, 2023, 4:02 PM
Hello Ramco,
To create & consume API using Rest Sharp you need to do following.
1. You need to install RestSharp by adding it as a NuGet package to your .NET project. To do this, right-click on your project in Visual Studio and select "Manage NuGet Packages". Search for "RestSharp" and install the package.
2 Then you can consume API as show in below code:
Here i have given only GET opration code. Please refer below link for other like POST, PUT etc..
https://code-maze.com/aspnetcore-using-restsharp-consume-api/
Thanks
Naimish Makwana