예제 #1
0
        /// <summary>
        /// Clear all settings
        /// </summary>
        /// <returns></returns>
        public RestClient Clear()
        {
            QueryItems.Clear();
            PathItems   = StringVector.Empty;
            BaseAddress = null;

            return(this);
        }
예제 #2
0
        /// <summary>
        /// Clear all settings
        /// </summary>
        /// <returns></returns>
        public RestClient Clear()
        {
            HeaderItems.Clear();
            QueryItems.Clear();
            PathItems   = StringVector.Empty;
            AbsoluteUri = null;
            BaseAddress = null;

            return(this);
        }
예제 #3
0
            public override void Intercept(HttpClient httpClient)
            {
                QueryItems.Clear();

                QueryItems.Add(new KeyValuePair <string, string>("Accept", "application/json"));

                var sessionInfo = _sessionInfoHolder.SessionInfo;

                if (sessionInfo != null)
                {
                    QueryItems.Add(new KeyValuePair <string, string>("Authorization", sessionInfo.ToString()));
                }

                base.Intercept(httpClient);
            }