Get() публичный Метод

Get a response from the HTTP
public Get ( Action callback ) : void
callback Action
Результат void
 void RegisterUser(SmartObject obj, ulong sender)
 {
     string username = obj.GetString("username");
     string password = obj.GetString("password");
     string email = obj.GetString("email");
     HTTP http = new HTTP("http://www.turnofwar.com/game/newuser.php");
     http.Get((responses) => {
         Debug_Console.i.add((string) responses);
         SmartObject response_obj = new SmartObject();
         response_obj.AddString("type", "Register");
         response_obj.AddString("response", (string) responses);
         response_obj.AddInt("sender", (int) Networking.PrimarySocket.Me.NetworkId);
         Networking.WriteCustom(EventHelper.GetEventId("ServerResponse"), socket, EasySerialization.EasySerialize(response_obj), GetNetPlayer(sender), true);
     }, new string[3] { "username="******"password="******"email=" + email });
 }
	private static void CheckForUpdates()
	{
		HTTP http = new HTTP("http://developers.forgepowered.com/Model/Info");
		http.Get((obj) =>
		{
			SimpleJSON.JSONNode data = SimpleJSON.JSONNode.Parse((string)obj);
			if (data["version"] == null)
			{
				Debug.LogWarning("Could not connect to server to check version");
				return;
			}

			if (CURRENT_VERSION < data["version"].AsFloat)
				Debug.Log("WOOT! There is a new version available! :D\nGo to http://developers.forgepowered.com/Profile to download now!");
			else
				Debug.Log("You already have the latest version of Forge Networking");
		});
	}
	public void Initialize()
	{
#if UNITY_5_1
		titleContent.text = "Forge Editor";
#else
		title = "Forge Editor";
#endif

		minSize = new Vector2(400, 400);
		ForgeIcon = Resources.Load<Texture2D>("BMSLogo");
		ScrollPos = Vector2.zero;
		
		regularWhite.fontSize = 14;
		regularWhite.wordWrap = true;

		if (UnityEditorInternal.InternalEditorUtility.HasPro())
		{
			regularWhite.normal.textColor = Color.white;
			boldWhite.normal.textColor = Color.white;
		}

		boldWhite.fontSize = 14;
		boldWhite.wordWrap = true;
		boldWhite.fontStyle = FontStyle.Bold;
		News.Add(new ForgeEditorDisplayObject("Loading news...", ForgeEditorDisplayObject.DisplayType.Paragraph, boldWhite, regularWhite));
		Videos.Add(new ForgeEditorDisplayObject("Loading videos...", ForgeEditorDisplayObject.DisplayType.Paragraph, boldWhite, regularWhite));
		//Videos.Add(new ForgeEditorDisplayObject("Under Construction!", ForgeEditorDisplayObject.DisplayType.Header, boldWhite, regularWhite));		
		//Store.Add(new ForgeEditorDisplayObject("Loading store...", ForgeEditorDisplayObject.DisplayType.Paragraph, boldWhite, regularWhite));
		Documentation.Add(new ForgeEditorDisplayObject("Coming soon!", ForgeEditorDisplayObject.DisplayType.Header, boldWhite, regularWhite));
		//About.Add(new ForgeEditorDisplayObject("Bearded Man Studios, Inc.", ForgeEditorDisplayObject.DisplayType.Header, boldWhite, regularWhite));
		//About.Add(new ForgeEditorDisplayObject("Brent Farris, Brett Faulds", ForgeEditorDisplayObject.DisplayType.Paragraph, boldWhite, regularWhite));
		HTTP newsHttp = new HTTP(NEWS_ENDPOINT);
		newsHttp.Get(LayoutNews);
		HTTP videosHttp = new HTTP(VIDEOS_ENDPOINT);
		videosHttp.Get(LayoutVideos);
		//HTTP storeHttp = new HTTP(STORE_ENDPOINT);
		//storeHttp.Get(LayoutStore);
	}
 void UserLogin(SmartObject obj, ulong sender)
 {
     string username = obj.GetString("username");
     string password = obj.GetString("password");
     HTTP http = new HTTP("http://www.turnofwar.com/game/userlogin.php");
     http.Get((responses) => {
         Debug_Console.i.add((string) responses);
         SmartObject response_obj = new SmartObject();
         response_obj.AddString("type", "Login");
         response_obj.AddString("response", (string) responses);
         response_obj.AddInt("sender", (int) Networking.PrimarySocket.Me.NetworkId);
         Networking.WriteCustom(EventHelper.GetEventId("ServerResponse"), socket, EasySerialization.EasySerialize(response_obj), GetNetPlayer(sender), true);
         if((string) responses == "1") {
             //if the server responds as wrong login
             server_model.Verifyuser((ulong) obj.GetInt("sender"));
         }
     }, new string[2] { "username="******"password=" + password });
 }