Package com.prineside.tdi2.managers
Class HttpManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.HttpManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Manager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.Net.HttpRequest
sendPostRequest
(String url, com.badlogic.gdx.utils.ObjectMap<String, String> parameters, HttpManager.RequestListener responseListener) void
sendRequest
(com.badlogic.gdx.Net.HttpRequest httpRequest, HttpManager.RequestListener responseListener) Main method, use instead of Gdx.net.sendHttpRequest.Methods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, dispose, postRender, preRender, setup, test
-
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)
-