Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi authored Mar 22, 2022
1 parent 4fb032e commit 1b60995
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ func main() {
```

### HTTP Methods
You can use the `Map()` method to declare routes. It gets HTTP methods and paths (URIs).
You can use the `Map()` method to declare routes.
It gets HTTP methods and paths (URIs).
There are also some methods available for the most used HTTP methods.
These methods are `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, and `OPTIONS`.
The `Any()` method defines routes that handles any HTTP method.

```go
package main
Expand All @@ -85,9 +87,11 @@ func main() {
r.HEAD("/", Handler)
r.OPTIONS("/", Handler)

r.Any("/page", Handler)

r.Map("GET", "/", Handler)
r.Map("CUSTOM", "/", Handler)

log.Fatalln(r.Start(":8000"))
}
```
Expand Down

0 comments on commit 1b60995

Please sign in to comment.