Пример #1
0
        public HttpClient(IContainerConfiguration containerConfiguration)
        {
            var registry = containerConfiguration.InitializeContainer();

            ObjectFactory.Initialize(
                x => x.AddRegistry(registry));

            _codec = ObjectFactory.GetInstance<ICodec>();

            _log = ObjectFactory.TryGetInstance<ILog>();

            Request = new HttpRequest(_codec);
        }
Пример #2
0
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            _encoder = encoderDecoderConfiguration.GetEncoder();
            _decoder = encoderDecoderConfiguration.GetDecoder();
            _decoder.ShouldRemoveAtSign = ShouldRemoveAtSign;
            _uriComposer = new UriComposer();

            Request = new HttpRequest(_encoder);
        }
Пример #3
0
        public HttpClient(IContainerConfiguration containerConfiguration)
        {
            var registry = containerConfiguration.InitializeContainer();

            ObjectFactory.Initialize(x => x.AddRegistry(registry));

            _encoder = ObjectFactory.GetInstance<IEncoder>();
            _decoderFactory = ObjectFactory.GetInstance<IDecoderFactory>();

            Request = new HttpRequest(_encoder);
        }
Пример #4
0
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            _encoder = encoderDecoderConfiguration.GetEncoder();
            _decoder = encoderDecoderConfiguration.GetDecoder();

            Request = new HttpRequest(_encoder);
        }
Пример #5
0
        public HttpClient(string baseUri, Action<EasyHttpConfiguration> configurationOverride)
        {
            uriComposer = new UriComposer();

            this.baseUri = baseUri;

            var configuration = EasyHttpConfiguration.Current;

            if(configurationOverride != null)
                configurationOverride.Invoke(configuration);

            deserializers = configuration.Deserializers;
            serializers = configuration.Serializers;

            Request = new HttpRequest(serializers);
            Request.Accept = configuration.AcceptContentType;
        }
 public FileRequestProcessor(HttpRequest request, string filename)
 {
     _request = request;
     _filename = filename;
 }
 public BodyRequestProcessor(HttpRequest request)
 {
     _request = request;
 }