Skip to content

Commit

Permalink
docs: Update README.md (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeCheneler authored Nov 19, 2024
1 parent dc91935 commit 8aa293f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,18 @@ context.response.headers.delete("Content-Type", "text/plain");

A number of utility methods are available to configure the response content.

`context.text(...)`

Respond with text.

```tsx
context.text(StatusCode.OK, "Hello, World!");
```

`context.json(...)`

Respond with JSON.

```tsx
context.json(StatusCode.OK, { message: "Hello, World!" });
```

`context.render(...)`

Render JSX to HTML using [Preact](https://preactjs.com).

```tsx
Expand All @@ -162,16 +156,12 @@ await context.render(
);
```

`context.empty(...)`

Respond with an empty response, useful for response like `204 No Content`.

```tsx
context.empty(StatusCode.NoContent);
```

`context.redirect(...)`

Redirect the request to another location.

```tsx
Expand Down

0 comments on commit 8aa293f

Please sign in to comment.