How to do REST API Testing using REST SHARP and C# / Simple API Test using REST SHARP
Code:
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleAPI
{
internal class Program
{
static void Main(string[] args)
{
var Client = new RestClient("https://reqres.in/");
var request = new RestRequest("/api/users?page=2",Method.Get);
request.AddHeader("Accept", "application/json");
request.RequestFormat = DataFormat.Json;
RestResponse response = Client.Execute(request);
var content = response.Content;
Console.WriteLine(content);
Console.ReadKey(true);
}
}
}
Chapters:
0:00 - Introduction to rest api testing
1:07 - Creating a simple API Testing project with rest sharp (nuget pacakge)
3:00 - Program for testing rest api using rest sharp
8:10 - Execution of the program
8:46 - End Tags and subscription of the channel
Donation Section:
Now you can Donate us via Paypal or Google Pay
Paypal link : https://www.paypal.me/Azhar67
GooglePay/PhonePe/BHIM App UPI ID : shaikazharjamal@okhdfcbank
My second Channel:
WrestleTalkByAzhar - / wrestletalkbyazhar
Next Steps :
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists
► 1. Javascript - • Javascript Factory
► 2. Puppetter - • Puppeteer
► 3. Cypress - • Cypress
► 4. Tech works - • Video
► 5. Vbscript Basics To Advanced - • VBScript Part 1 - Features Advantage...
► 6. Jmeter - • Jmeter Tutorials
► 7. Excel - • Videos On Excel
► 8. Appium - • Appium
► 9. Shares - • Shares
► 10. Javascript Interview Questions - • Javascript Interview Questions
► 11. C# Tutorials - • C# Factory
► 12. HTML & CSS - • HTML & CSS
► 13. Browser Console - • Browser Console
► 14. JSON - • Videos on Json
► 15. Specflow - • Specflow Tutorials
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#restsharp
#apitesting
#specflow