Exemplo n.º 1
0
 public RestRequest AddFormUrlEncodedValue(string key, string value)
 {
     if (!string.IsNullOrEmpty(key))
     {
         FormUrlData.Add(new KeyValuePair <string, string>(key, value));
     }
     return(this);
 }
Exemplo n.º 2
0
        public RestRequest RemoveFormUrlEncodedData(string key)
        {
            if (FormUrlData.Any(t => t.Key == key))
            {
                FormUrlData.Remove(FormUrlData.FirstOrDefault(t => t.Key == key));
            }

            return(this);
        }
Exemplo n.º 3
0
        public RestRequest AddFormUrlEncodedData(object data)
        {
            var list = ConventPropertyToParamList(data);

            foreach (var item in list)
            {
                FormUrlData.Add(new KeyValuePair <string, string>(item.Key, item.Value));
            }

            return(this);
        }