RestSharp

RestSharp Features RestSharp Features The RestSharp library boasts some powerful features, making it a singularly unique tool that syncs admirably with RESTful architecture and helps in creating varied DotNet applications. Some of these features include: Custom serialization Read more »
Sending RestAPI Request using Browser Why not just try to open http://restapi.demoqa.com/utilities/weather/city/London in browser. Output will look like below: { “City”: “London”, “Temperature”: “9.36 Degree celsius”, “Humidity”: “81 Percent”, “WeatherDescription”: “overcast clouds”, “WindSpeed”: “5.7 Km per hour”, “WindDirectionDegree”: “220 Degree” } Read more »
Sending RestAPI Request using Postman Sending RestAPI Request using Postman We can send the same request in Postman. http://restapi.demoqa.com/utilities/weather/city/London Read more »
How to Automate REST API using RestSharp? How to Automate REST API using RestSharp? In order automate the API using RestSharp, we need to follow the steps below: Create a test class Weatherand test method GetWeatherInfo() in solution project. Use the RestSharpclass to generate a RestClient for the URL: http://restapi.demoqa.com/utilities/weather/city/London Create Read more »
Passing Headers, Parameters in RestSharp Passing Headers in RestSharp Use “AddHeader” built-in method to pass the info through header’s. Passing parameters in RestSharp We have “AddParameter” build-in method to pass the parameter to Rest API. Example: request.AddHeader(“Content-Type”, “application/json”);   Sample Read more »