docs: fix some typos (#211)

Co-authored-by: hashrock <hashrock@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
antoninbeaufort
2022-05-28 22:51:39 +02:00
committed by GitHub
co-authored by hashrock Luca Casonato
parent c299d7b6a4
commit 3ff689d8f9
4 changed files with 14 additions and 12 deletions
+5 -4
View File
@@ -31,11 +31,12 @@ then adds a custom header to the response before returning it:
// routes/about.tsx
/** @jsx h */
import { h, Handlers } from "$fresh/runtime.ts";
import { h } from "$fresh/runtime.ts";
import { Handlers } from "$fresh/server.ts";
export const handler: Handlers = {
GET(req, ctx) {
const resp = ctx.render();
async GET(req, ctx) {
const resp = await ctx.render();
resp.headers.set("X-Custom-Header", "Hello");
return resp;
},
@@ -58,7 +59,7 @@ response:
```ts
// routes/api/random-uuid.ts
import { Handlers } from "$fresh/runtime.ts";
import { Handlers } from "$fresh/server.ts";
export const handler: Handlers = {
GET(req) {
+1 -1
View File
@@ -16,7 +16,7 @@ around the HTML `<form>` element.
next chapter explains how to progressively enhance your forms with client side
JavaScript to make them more interactive.
The way forms work in the browser, is that they peform a HTML navigation action
The way forms work in the browser, is that they perform a HTML navigation action
when the user submits the form. In most cases this means that when the form is
submitted, a GET or POST request is sent to the server with the form data, which
then responds with a new page to render.