Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
7phs authored May 13, 2019
1 parent da5d9dd commit 9075c9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ var (

### Example init hooks/handlers
```golang
aApi.RegisterEventHandler(aandaSdk.BeforeRequestSend, func(ctx context.Context, methodName, mimeType string, data []byte) {
aApi.RegisterEventHandler(aandaSdk.BeforeRequestSend, func(ctx context.Context, methodName, query, mimeType string, data []byte) {
requestId := ctx.Value("requestId").(string)

log.Println("request: ", requestId, methodName, mimeType, string(data))
}).RegisterEventHandler(aandaSdk.AfterResponseReceive, func(ctx context.Context, methodName, mimeType string, data []byte) {
log.Println("request: ", requestId, methodName, query, mimeType, string(data))
}).RegisterEventHandler(aandaSdk.AfterResponseReceive, func(ctx context.Context, methodName, query, mimeType string, data []byte) {
requestId := ctx.Value("requestId").(string)

log.Println("response: ", requestId, methodName, mimeType, string(data))
log.Println("response: ", requestId, methodName, query, mimeType, string(data))
})
```

Expand Down

0 comments on commit 9075c9e

Please sign in to comment.