Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SentryMan authored Dec 2, 2024
1 parent 4703315 commit 15547bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
[![javadoc](https://javadoc.io/badge2/io.avaje/avaje-jex/javadoc.svg?color=purple)](https://javadoc.io/doc/io.avaje/avaje-jex)

# Avaje-Jex

Lightweight (~120KB) wrapper over the JDK's [`jdk.httpserver`](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.httpserver/module-summary.html) classes.
Lightweight (~120KB) wrapper over the JDK's built-in [HTTP server](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.httpserver/module-summary.html).

Features:

- [Context](https://javadoc.io/doc/io.avaje/avaje-jex/latest/io.avaje.jex/io/avaje/jex/Context.html) abstraction over `HttpExchange` to easily retrieve and send request/response data.
- Fluent API
- Static resource handling
- Compression SPI (will use gzip by default if the caller accepts it and the response exceeds a certain size)
- Json SPI (will use either Avaje Jsonb or Jackson if available)
- Compression SPI
- Json SPI
- Virtual threads enabled by default

```java
Expand All @@ -29,7 +28,7 @@ var app = Jex.create()
System.out.println("before request");
chain.proceed();
System.out.println("after request");
}))
})
.error(IllegalStateException.class, (ctx, exception) -> ctx.status(500).text("Handled IllegalStateException|" + exception.getMessage()))
.staticResource(
b ->
Expand Down

0 comments on commit 15547bc

Please sign in to comment.