using System.Threading.Tasks;
using DalSoft.RestClient;
using Newtonsoft.Json.Serialization;
public async static Task Main()
var client = new RestClient("https://jsonplaceholder.typicode.com", new Config()
.SetJsonSerializerSettings(new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }));
.Resource("users/1").Get()
.Verify(user => user.username == "Fail")
.Verify<HttpResponseMessage>(response => response.StatusCode == HttpStatusCode.BadRequest)
.OnVerifyFailed((aggregateException, response) =>
Console.WriteLine("OnVerifyFailed Called");