Hey guys,
finally I found time to check out v 0.11.2 :). I think I found a bug here :(.
=> Starting the Server on windows fails:
D:\hello-baratine-gradle>java -jar build\libs\hello-baratine-gradle-boot.jar
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/hello-baratine-gradle/build/libs/hello-baratine-gradle-boot.jar
at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPath.parse(Unknown Source)
at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
at java.nio.file.Paths.get(Unknown Source)
at com.caucho.v5.boot.BaratineBoot.newBootFile(BaratineBoot.java:135)
at com.caucho.v5.boot.BaratineBoot.main(BaratineBoot.java:54)
windows: win7 32b
java version: 1.8.0_40
I've rerun my example on linux - it worked. Is it okay for you to post bugs here - or should I have used github repo?
====================================
// Server.java
import static io.baratine.web.Web.*;
public class Server {
public static void main(String[] args) {
include(Login.class);
start(args);
}
}
// Login.java
import io.baratine.service.Service;
import io.baratine.web.Get;
import io.baratine.web.RequestWeb;
@Service
public class Login {
@Get("/login")
public void get(RequestWeb req) {
req.cookie("a-cookie", "a cookie; HttpOnly");
req.ok("Login\n");
}
@Post("/login")
public void post(RequestWeb req) {
req.ok("Login Successful!\n");
}
}
====================================