コード例 #1
0
ファイル: HttpClient.cs プロジェクト: emilcardell/EasyHttp
        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
ファイル: HttpClient.cs プロジェクト: Vittel/Trakkr
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            _encoder = encoderDecoderConfiguration.GetEncoder();
            _decoder = encoderDecoderConfiguration.GetDecoder();
            _decoder.ShouldRemoveAtSign = ShouldRemoveAtSign;
            _uriComposer = new UriComposer();

            Request = new HttpRequest(_encoder);
        }
コード例 #3
0
        public HttpClient(IEncoderDecoderConfiguration encoderDecoderConfiguration)
        {
            this.encoder = encoderDecoderConfiguration.GetEncoder();
            this.decoder = encoderDecoderConfiguration.GetDecoder();
            this.uriComposer = new UriComposer();

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