Example #1
0
        public void AddHeader(string key, string value)
        {
            var item = new SerializableKeyValue(key, value);

            if (!Headers.Contains(item))
            {
                Headers.Add(item);
            }
            else
            {
                Headers[Headers.FindIndex(kv => string.Equals(kv.Key, key))] = item;
            }
        }
Example #2
0
        public void AddQueryParam(string key, string value)
        {
            var item  = new SerializableKeyValue(key, value);
            var index = Params.FindIndex(kv => string.Equals(kv.Key, key));

            if (index < 0)
            {
                Params.Add(item);
            }
            else
            {
                Params[index] = item;
            }
        }