Class HttpManager

java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.HttpManager
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Manager

public final class HttpManager extends Manager.ManagerAdapter
  • Constructor Details

    • HttpManager

      public HttpManager()
  • Method Details

    • sendRequest

      public void sendRequest(com.badlogic.gdx.Net.HttpRequest httpRequest, @Null HttpManager.RequestListener responseListener)
      Main method, use instead of Gdx.net.sendHttpRequest. Called on a Net thread, httpRequest only valod on this thread. If you need to handle responses on the main thread, use Gdx.app.postRunnable() and pass string / bytes stored on the net thread beforehand
    • sendPostRequest

      public com.badlogic.gdx.Net.HttpRequest sendPostRequest(String url, @Null com.badlogic.gdx.utils.ObjectMap<String,String> parameters, @Null HttpManager.RequestListener responseListener)