Skip to content

Commit

Permalink
update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi committed Feb 6, 2024
1 parent 45f70f9 commit 6e96adc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/dsl/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ Creates a `Handler` that always fails with the given error.
Handler.error(Status.Forbidden)
```

### Handler.response
### Handler.fromResponse

Creates an `Handler` that always responds with the same `Response`.

```scala mdoc:silent
Handler.response(Response.ok)
Handler.fromResponse(Response.ok)
```

## Special operators on Handler
Expand All @@ -125,7 +125,7 @@ handler11.method(Method.POST)
Patches the response produced by the request handler using a `Patch`.

```scala mdoc:silent
val handler12 = Handler.response(Response.text("Hello World!"))
val handler12 = Handler.fromResponse(Response.text("Hello World!"))
val handler13 = handler12.patch(Response.Patch.status(Status.Accepted))
```

Expand Down

0 comments on commit 6e96adc

Please sign in to comment.