# `syntax.expected_http_method`

Route method is not one a route is written with.

Area 7, [HTTP](../topics/http.md); not declinable; the next step is usually the agent's.

A route is written with `GET`, `POST`, `PUT`, `PATCH` or `DELETE`; a word another framework uses is read as the method it means:

```jadpo
type Memo = Text {
    max_length: 200
}

type MemoId = Uuid {}

type AddMemo = Input {
    text: Memo
}

type MemoView = Output {
    text: Memo
}

action add_memo(input: AddMemo) -> MemoView {
    return MemoView {
        text: input.text
    }
}

routes Memos {
    prefix: /memos

    CREATE / {
        input: AddMemo
        output: MemoView
        run: add_memo(input)
    }
}
```

```text
error: `CREATE` isn't a method a route is written with
 --> main.jadpo:24:5
   |
24 |     CREATE / {
   |     ^^^^^^ not a route method
  reason: Routes are written with `GET`, `POST`, `PUT`, `PATCH` or `DELETE`.
  next: Use `POST` instead of `CREATE` (agent)
  rule: syntax.expected_http_method
  help: https://jadpo.dev/docs/errors/syntax.expected_http_method

check failed: 1 error, 1 file
```
