Beispiel #1
0
        private static string GetRequestUrl(params string[] args)
        {
            var frames = new List <string>();

            frames.Add(GathererContext.Current.GathererPath);
            frames.AddRange(args);
            return(UriPath.Combine(frames.ToArray()));
        }
Beispiel #2
0
 public string HttpPostJson(string url, object instance, NameValueCollection data)
 {
     url = UriPath.AppendArguments(url, data);
     if (this.Async)
     {
         PostJsonAsync(new Uri(url), instance);
         return(String.Empty);
     }
     else
     {
         return(PostJson(url, instance));
     }
 }
Beispiel #3
0
 public string HttpGet(string url, object values)
 {
     url = UriPath.AppendArguments(url, values);
     if (this.Async)
     {
         GetAsync(new Uri(url));
         return(String.Empty);
     }
     else
     {
         return(Get(new Uri(url)));
     }
 }
Beispiel #4
0
 public string HttpGet(string url, NameValueCollection data)
 {
     url = UriPath.AppendArguments(url, data);
     if (this.Async)
     {
         GetAsync(new Uri(url));
         return(String.Empty);
     }
     else
     {
         return(Get(new Uri(url)));
     }
 }
Beispiel #5
0
        public string HttpPost(string url, object values)
        {
            var data = UriPath.ToNameValueCollection(values);

            if (this.Async)
            {
                PostAsync(new Uri(url), data);
                return(String.Empty);
            }
            else
            {
                return(Post(url, data));
            }
        }