29 lines
745 B
Java
29 lines
745 B
Java
package mx.uv;
|
|
import static spark.Spark.*;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.UUID;
|
|
|
|
import com.google.gson.*;
|
|
public class App
|
|
{
|
|
public static void main( String[] args )
|
|
{
|
|
System.out.println( "Hello World!" );
|
|
//port(80);
|
|
|
|
get("/usuarios", (request, response) ->{
|
|
response.type("application/json");
|
|
JsonObject respuesta = new JsonObject();
|
|
respuesta.addProperty("msj", "hola");
|
|
return respuesta;
|
|
});
|
|
post("/usuarios", (request, response) ->{
|
|
String payload = request.body();
|
|
JsonObject respuesta = new JsonObject();
|
|
respuesta.addProperty("msj", "");
|
|
return respuesta;
|
|
});
|
|
}
|
|
}
|