Exemplo n.º 1
0
        /// <summary>Requests a file over the internet.</summary>
        /// <param name="url">The url to request.</param>
        /// <param name="onDone">A method to call with the result.</param>
        /// <param name="extraData">An object which will be available in the onDone method.</param>
        public static void Request(string url, OnHttpEvent onDone, object extraData)
        {
            HttpRequest request = new HttpRequest(url, onDone);

            request.ExtraData = extraData;
            request.Send();
        }
Exemplo n.º 2
0
		/// <summary>Requests a file over the internet and posts form data to it.</summary>
		/// <param name="url">The url to request.</param>
		/// <param name="onDone">A method to call with the result.</param>
		/// <param name="form">A http form to send with the request.</param>
		public static void Request(string url,OnHttpEvent onDone,WWWForm form){
			HttpRequest request=new HttpRequest(url,onDone);
			
			if(form!=null){
				request.AttachForm(form);
			}
			
			request.Send();
		}
Exemplo n.º 3
0
        /// <summary>Requests a file over the internet and posts form data to it.</summary>
        /// <param name="url">The url to request.</param>
        /// <param name="onDone">A method to call with the result.</param>
        /// <param name="form">A http form to send with the request.</param>
        public static void Request(string url, OnHttpEvent onDone, WWWForm form)
        {
            HttpRequest request = new HttpRequest(url, onDone);

            if (form != null)
            {
                request.AttachForm(form);
            }

            request.Send();
        }
Exemplo n.º 4
0
 /// <summary>Requests a file over the internet.</summary>
 /// <param name="url">The url to request.</param>
 /// <param name="onDone">A method to call with the result.</param>
 public static void Request(string url, OnHttpEvent onDone)
 {
     Request(url, onDone, null);
 }
Exemplo n.º 5
0
		/// <summary>Requests a file over the internet.</summary>
		/// <param name="url">The url to request.</param>
		/// <param name="onDone">A method to call with the result.</param>
		/// <param name="extraData">An object which will be available in the onDone method.</param>
		public static void Request(string url,OnHttpEvent onDone,object extraData){
			HttpRequest request=new HttpRequest(url,onDone);
			request.ExtraData=extraData;
			request.Send();
		}
Exemplo n.º 6
0
		/// <summary>Requests a file over the internet.</summary>
		/// <param name="url">The url to request.</param>
		/// <param name="onDone">A method to call with the result.</param>
		public static void Request(string url,OnHttpEvent onDone){
			Request(url,onDone,null);
		}
Exemplo n.º 7
0
 /// <summary>Creates a new http request to the given url.</summary>
 /// <param name="url">The url to request.</param>
 /// <param name="onDone">A method to call with the result.</param>
 public HttpRequest(string url, OnHttpEvent onDone)
 {
     Url            = url;
     OnRequestDone += onDone;
 }