Skip to content
Snippets Groups Projects
Commit bb0f4b7e authored by ivarnm's avatar ivarnm
Browse files

#10 Initial commit

parent 203b26c4
Branches
No related tags found
1 merge request!34Resolve "SinglePlayerSelectGameState"
.vscode
\ No newline at end of file
package com.gameware.game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Net;
import com.badlogic.gdx.Net.HttpMethods;
import com.badlogic.gdx.Net.HttpRequest;
import com.badlogic.gdx.Net.HttpResponse;
public class QueryIntermediate {
private static String baseUrl = "http://localhost:3001/api";
private static void testApi() {
System.out.println("testApi");
HttpRequest request = new HttpRequest(HttpMethods.GET);
request.setUrl("http://libgdx.badlogicgames.com/nightlies/dist/AUTHORS");
Gdx.net.sendHttpRequest(request, new Net.HttpResponseListener() {
@Override
public void handleHttpResponse (HttpResponse httpResponse) {
System.out.println("response: " + httpResponse.getResultAsString());
}
@Override
public void failed (Throwable t) {
System.out.println("Something went wrong");
}
@Override
public void cancelled () {
System.out.println("Cancelled");
}
});
}
public static void main(String[] args) {
System.out.println("hello");
QueryIntermediate.testApi();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment