Skip to content

Commit

Permalink
Update README.md (#58)
Browse files Browse the repository at this point in the history
DefaultRequestID instead of DefaultRPCRequestID
  • Loading branch information
fnguyen-tc authored Jan 31, 2024
1 parent 3f5fdc4 commit 13aad5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,16 @@ func main() {
### Change default RPCRequestID

By default, the client will set the id of an RPCRequest to 0.
This can be changed by setting the RPCClientOpts.DefaultRPCRequestID to a custom value:
This can be changed by setting the RPCClientOpts.DefaultRequestID to a custom value:

```go
func main() {
rpcClient := jsonrpc.NewClientWithOpts("http://my-rpc-service:8080/rpc", &jsonrpc.RPCClientOpts{
DefaultRPCRequestID: 1,
DefaultRequestID: 1,
})

// requests now have default id 1
}
```

You may also use NewRequestWithID() to set a custom id when creating a raw request.
You may also use NewRequestWithID() to set a custom id when creating a raw request.

0 comments on commit 13aad5f

Please sign in to comment.