From f28c7116bcc9d38a8734f883ebe42bdcb7e70d89 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 6 May 2024 23:41:24 +0330 Subject: [PATCH 1/8] enrich index.md file. --- docs/index.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/index.md b/docs/index.md index d1f7e91ddd..bdd3e23731 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,25 @@ ZIO HTTP is a scala library for building http apps. It is powered by ZIO and [Ne @PROJECT_BADGES@ +## Introduction + +ZIO HTTP provides a simple and expressive API for building both server and client-side applications. ZIO HTTP is designed in terms of **HTTP as function**, where both server and client are a function from `Request` to `Response`. + +Key features of ZIO HTTP includes: + +**ZIO Native**: ZIO HTTP is built atop ZIO, a type-safe, composable, and asynchronous effect system for Scala. It inherits all the benefits of ZIO, including testability, composability, and type safety. +**Cloud-Native**: ZIO HTTP is designed for cloud-native environments and supports building highly scalable and performant web applications. Built atop ZIO, it features built-in support for concurrency, parallelism, resource management, error handling, structured logging, configuration management, and metrics instrumentation. +**Declarative Endpoints**: The API offers a declarative approach to defining HTTP endpoints. Each endpoint can be described by its inputs and outputs, expressing the shape of the endpoint. +**Middleware Support**: ZIO HTTP offers middleware support for incorporating cross-cutting concerns such as logging, metrics, authentication, and more into your services. +**Error Handling**: Built-in support exists for handling errors at the HTTP layer, distinguishing between handled and unhandled errors. +**WebSockets**: Built-in support for WebSockets allows for the creation of real-time applications using ZIO HTTP. +**Testkit**: ZIO HTTP provides first-class testing utilities that facilitate test writing without requiring a live server instance. +**Interoperability**: Interoperability with existing Scala/Java libraries is provided, enabling seamless integration with functionality from the Scala/Java ecosystem through the importation of blocking and non-blocking operations. +**JSON and Binary Codecs**: Built-in support for ZIO Schema enables encoding and decoding of request/response bodies, supporting various data types including JSON, Protobuf, Avro, and Thrift. +**Template System**: A built-in DSL facilitates writing HTML templates using Scala code. +**OpenAPI Support**: Built-in support is available for generating OpenAPI documentation for HTTP applications, and conversely, for generating HTTP endpoints from OpenAPI documentation. +**ZIO HTTP CLI**: Command-line applications can be built to interact with HTTP APIs. + ## Installation Setup via `build.sbt`: From 32837d715ab1125a30b5302a6ffd8b10de60ab40 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 6 May 2024 23:43:20 +0330 Subject: [PATCH 2/8] update. --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index bdd3e23731..2714a35e1c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ ZIO HTTP is a scala library for building http apps. It is powered by ZIO and [Ne ZIO HTTP provides a simple and expressive API for building both server and client-side applications. ZIO HTTP is designed in terms of **HTTP as function**, where both server and client are a function from `Request` to `Response`. -Key features of ZIO HTTP includes: +Some of the key features of ZIO HTTP are: **ZIO Native**: ZIO HTTP is built atop ZIO, a type-safe, composable, and asynchronous effect system for Scala. It inherits all the benefits of ZIO, including testability, composability, and type safety. **Cloud-Native**: ZIO HTTP is designed for cloud-native environments and supports building highly scalable and performant web applications. Built atop ZIO, it features built-in support for concurrency, parallelism, resource management, error handling, structured logging, configuration management, and metrics instrumentation. From 3abd8c49ac7a3f58a20806050d52619d5da40242 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Tue, 7 May 2024 08:58:18 +0330 Subject: [PATCH 3/8] Http => HTTP --- docs/examples/websocket.md | 2 +- docs/index.md | 6 +++--- docs/installation.md | 2 +- docs/reference/aop/handler_aspect.md | 2 +- docs/reference/handler.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/examples/websocket.md b/docs/examples/websocket.md index ca6746d7ef..52d5683617 100644 --- a/docs/examples/websocket.md +++ b/docs/examples/websocket.md @@ -4,7 +4,7 @@ title: "WebSocket Example" sidebar_label: "WebSocket Server & Client" --- -This example shows how to create a WebSocket server using ZIO Http and how to write a client to connect to it. +This example shows how to create a WebSocket server using ZIO HTTP and how to write a client to connect to it. ## Server diff --git a/docs/index.md b/docs/index.md index 2714a35e1c..842e798647 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,7 +1,7 @@ --- id: index -title: "Introduction to ZIO Http" -sidebar_label: "ZIO Http" +title: "Introduction to ZIO HTTP" +sidebar_label: "ZIO HTTP" --- ZIO HTTP is a scala library for building http apps. It is powered by ZIO and [Netty](https://netty.io/) and aims at being the defacto solution for writing, highly scalable and performant web applications using idiomatic Scala. @@ -37,7 +37,7 @@ libraryDependencies += "dev.zio" %% "zio-http" % "@VERSION@" **NOTES ON VERSIONING:** -- Older library versions `1.x` or `2.x` with organization `io.d11` of ZIO Http are derived from Dream11, the organization that donated ZIO Http to the ZIO organization in 2022. +- Older library versions `1.x` or `2.x` with organization `io.d11` of ZIO HTTP are derived from Dream11, the organization that donated ZIO HTTP to the ZIO organization in 2022. - Newer library versions, starting in 2023 and resulting from the [ZIO organization](https://dev.zio) started with `0.0.x`, reaching `1.0.0` release candidates in April of 2023 ## Getting Started diff --git a/docs/installation.md b/docs/installation.md index bfc8b5afca..2dd6ffb6b4 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -20,7 +20,7 @@ libraryDependencies += "dev.zio" %% "zio-http" % "@VERSION@" ## Using g8 Template -To set up a ZIO Http project using the provided g8 template we can run the following command on our terminal: +To set up a ZIO HTTP project using the provided g8 template we can run the following command on our terminal: ```shell sbt new zio/zio-http.g8 diff --git a/docs/reference/aop/handler_aspect.md b/docs/reference/aop/handler_aspect.md index bed8cd66bf..7fdfe57073 100644 --- a/docs/reference/aop/handler_aspect.md +++ b/docs/reference/aop/handler_aspect.md @@ -535,7 +535,7 @@ val route = If we deploy this route and send a GET request to the `/internal-error` route with the `Accept: text/html` header, we will get the following response body: ```html -ZIO Http - Forbidden