示例#1
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;
        }
示例#2
0
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            _encoder = encoderDecoderConfiguration.GetEncoder();
            _decoder = encoderDecoderConfiguration.GetDecoder();
            _decoder.ShouldRemoveAtSign = ShouldRemoveAtSign;
            _uriComposer = new UriComposer();

            Request = new HttpRequest(_encoder);
        }
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            this.encoder = encoderDecoderConfiguration.GetEncoder();
            this.decoder = encoderDecoderConfiguration.GetDecoder();
            this.uriComposer = new UriComposer();

            this.Request = new HttpRequest(this.encoder);
        }