diff --git a/avaje-jex-static-content/src/main/java/io/avaje/jex/staticcontent/package-info.java b/avaje-jex-static-content/src/main/java/io/avaje/jex/staticcontent/package-info.java index cadfdb52..62be4942 100644 --- a/avaje-jex-static-content/src/main/java/io/avaje/jex/staticcontent/package-info.java +++ b/avaje-jex-static-content/src/main/java/io/avaje/jex/staticcontent/package-info.java @@ -2,9 +2,9 @@ * Static Content API - see {@link io.avaje.jex.staticcontent.StaticContentService}. * *
{@code
- * var staticContent = StaticContentService.createCP("/public").directoryIndex("index.html");
+ * var staticContent = StaticContentService.createCP("/public").httpPath("/").directoryIndex("index.html");
  * final Jex.Server app = Jex.create()
- *   .routing(staticContent.createService())
+ *   .routing(staticContent)
  *   .port(8080)
  *   .start();
  *
diff --git a/avaje-jex-static-content/src/main/java/module-info.java b/avaje-jex-static-content/src/main/java/module-info.java
index 192a26ab..144923be 100644
--- a/avaje-jex-static-content/src/main/java/module-info.java
+++ b/avaje-jex-static-content/src/main/java/module-info.java
@@ -2,9 +2,9 @@
  * Defines the Static Content API for serving static resources with Jex - see {@link io.avaje.jex.staticcontent.StaticContentService}.
  *
  * 
{@code
- * var staticContent = StaticContentService.createCP("/public").directoryIndex("index.html");
+ * var staticContent = StaticContentService.createCP("/public").httpPath("/").directoryIndex("index.html");
  * final Jex.Server app = Jex.create()
- *   .routing(staticContent.createService())
+ *   .routing(staticContent)
  *   .port(8080)
  *   .start();
  *
diff --git a/avaje-jex/src/main/java/io/avaje/jex/Context.java b/avaje-jex/src/main/java/io/avaje/jex/Context.java
index cd91cad7..8d5703b1 100644
--- a/avaje-jex/src/main/java/io/avaje/jex/Context.java
+++ b/avaje-jex/src/main/java/io/avaje/jex/Context.java
@@ -246,17 +246,17 @@ default String userAgent() {
   int status();
 
   /** Write plain text content to the response. */
-  Context text(String content);
+  void text(String content);
 
   /** Write html content to the response. */
-  Context html(String content);
+  void html(String content);
 
   /**
    * Set the content type as application/json and write the response.
    *
    * @param bean the object to serialize and write
    */
-  Context json(Object bean);
+  void json(Object bean);
 
   /**
    * Write the stream as a JSON stream with new line delimiters {@literal
@@ -264,7 +264,7 @@ default String userAgent() {
    *
    * @param stream The stream of beans to write as json
    */
-   Context jsonStream(Stream stream);
+   void jsonStream(Stream stream);
 
   /**
    * Write the stream as a JSON stream with new line delimiters {@literal
@@ -272,28 +272,28 @@ default String userAgent() {
    *
    * @param iterator The iterator of beans to write as json
    */
-   Context jsonStream(Iterator iterator);
+   void jsonStream(Iterator iterator);
 
   /**
    * Writes the given string content directly to the response.
    *
    * @param content The string content to write.
    */
-  Context write(String content);
+  void write(String content);
 
   /**
    * Writes the given bytes directly to the response.
    *
    * @param bytes The byte array to write.
    */
-  Context write(byte[] bytes);
+  void write(byte[] bytes);
 
   /**
    * Writes the content from the given InputStream directly to the response body.
    *
    * @param is The input stream containing the content to write.
    */
-  Context write(InputStream is);
+  void write(InputStream is);
 
   /**
    * Return the outputStream to write content. It is expected that