Skip to content

Commit

Permalink
add to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mashiike committed Mar 14, 2024
1 parent 34cd124 commit f79c26b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ result, _ := svc.Invoke(input)

`ridge.ToRequestV2(*http.Request)` converts a net/http.Request to an API Gateway V2 event payload.

### Custom request builder

You can use a custom request builder to convert the AWS Lambda invoke payload to net/http.Request.

```go
r := ridge.New(":8080", "/", mux)
r.RequestBuilder = func(payload json.RawMessage) (*http.Request, error) {
// your custom request builder
}
r.Run()
```

default request builder is `ridge.NewRequest`.

## LICENSE

Expand Down

0 comments on commit f79c26b

Please sign in to comment.