nibbler is a HTTP micro-service DSL + library for Java 8 or higher based on RxNetty, the RxJava adapter for Netty developed by Netflix.
The current version is available in the maven central repository
import de.androbit.nibbler.RestHttpServerConfiguration;
import de.androbit.nibbler.RestServiceBuilder;
import de.androbit.nibbler.json.JacksonConverter;
import de.androbit.nibbler.netty.NettyHttpServer;
import static de.androbit.nibbler.json.JsonSupport.json;
public class JsonExample extends RestServiceBuilder {
@Override
public void define() {
path("/json").get((request, response) -> {
return response.with(json("Hello World!"));
});
}
public static void main(String[] args) {
RestHttpServerConfiguration restHttpServerConfiguration = new RestHttpServerConfiguration()
.withService(new JsonExample())
.withConverter(new JacksonConverter());
new NettyHttpServer()
.startAndWait(restHttpServerConfiguration);
}
}
Check Read The Docs for examples and documentation.
Starting with version 1.0.0, nibbler will follow semantic versioning. During the 0.x releases, the minor (.x) releases may include breaking changes.
nibbler is published under the terms of the Apache 2.0 License. See the LICENSE file.