Exemple #1
0
        /// <summary>
        /// Creates a new http client settings with blank defaults
        /// </summary>
        public HttpClientSettings()
        {
            Serializers      = new List <ISerializer>();
            Authenticator    = new NullAuthenticator();
            Logger           = new NullLogger();
            NamingConvention = new DefaultNamingConvention();
            UserAgent        = SpeakEasy.UserAgent.SpeakEasy;
            CookieStrategy   = new TransientCookieStrategy();
            ArrayFormatter   = new MultipleValuesArrayFormatter();

            Serializers.Add(new DefaultJsonSerializer());
            Serializers.Add(new DotNetXmlSerializer());
        }
        /// <summary>
        /// Creates a new http client settings with blank defaults
        /// </summary>
        public HttpClientSettings()
        {
            Serializers      = new List <ISerializer>();
            Authenticator    = new NullAuthenticator();
            NamingConvention = new DefaultNamingConvention();
            ArrayFormatter   = new MultipleValuesArrayFormatter();

            Serializers.Add(new DefaultJsonSerializer());
            Serializers.Add(new TextPlainSerializer());

            Middleware.Append(new TimeoutMiddleware());
            Middleware.Append(new UserAgentMiddleware());
        }