public RequestSender(Request request) { Request = request; Validator.ValidateRequest(Request); ResponseProcessor = new ResponseProcessor(); RestClient = new RestClient(Request.RequestUrl.FullUrl); Console.WriteLine("URL: " + Request.RequestUrl.FullUrl); Request.Headers.ToList().ForEach(header => Request.RestRequest.AddHeader(header.Key, header.Value)); }
public override Response Send() { Request.RestRequest.Method = Method.POST; return(ResponseProcessor.ExtractResponse(RestClient.Execute(Request.RestRequest))); }