Ejemplo n.º 1
0
        public string SendToUrl(string url, SortedList param, string method = "")
        {
            //   This method will do an http POST or GET request to the Url
            if(method == "")
            {
            method = default_http_method;
            }

            if (string.IsNullOrEmpty(url))
            {
            return "";
            }

            HTTPRequest http_obj = new  HTTPRequest(this.AccountSid, this.AccountSid);
            try
            {

            string data = http_obj.FetchResponse(url, method,session_params );
            return data;
            }
            catch(Exception ex)
            {
            return "";
            }
        }
Ejemplo n.º 2
0
        private string SendToUrl(string url, SortedList param, string method)
        {
            string data = string.Empty;
            if (string.IsNullOrEmpty(method))
                method = DefaultHTTPMethod;

            if (string.IsNullOrEmpty(url))
            {
                return string.Empty;
            }
            HTTPRequest HttpObj = new HTTPRequest(AuthId, AuthToken);
            try
            {
                data = HttpObj.FetchResponse(url, method, param);
            }
            catch (Exception ex)
            {
                return "";
            }
            return data;
        }