internal FluentWebRequestBuilder(WebRequestTools tools, string url)
 {
     _tools        = tools;
     _requestSpecs = new WebRequestSpecifications
     {
         Url          = url,
         AcceptHeader = _accept,
     };
 }
        public WebRequestBuilder(IEnumerable <IContentSerializer> serializers, ContentType defaultContentType, Action <WebRequest> webrequestModifier, IEnumerable <Credential> credentials)
        {
            var worker = new WebRequestWorker(webrequestModifier, ClientUtils.CreateCredentials(credentials));

            _tools = new WebRequestTools
            {
                DefaultContentType = defaultContentType == ContentType.Unknown ? ContentType.ApplicationJson : defaultContentType,
                Serializers        = serializers.ToList(),
                RequestModifier    = webrequestModifier,
                Resenders          = new List <IRequestResender>
                {
                    new UnsupportedMediaTypeResender(serializers.ToList(), worker)
                },
                RequestWorker = worker
            };
        }
 internal RequestWrapper(WebRequestSpecifications requestSpecs, WebRequestTools tools)
 {
     _requestSpecs = requestSpecs;
     _tools        = tools;
 }