Skip to content

Commit

Permalink
feat: headers getter for client
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Sep 14, 2024
1 parent 82f8ebf commit 7ce2a8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ func CreateUtxoRPCClient(baseUrl string, options ...ClientOption) *UtxorpcClient
return NewClient(httpClient, baseUrl, options...)
}

func (u *UtxorpcClient) Headers() map[string]string {
headers := u.headers
if headers == nil {
headers = make(map[string]string)
}
return headers
}

func (u *UtxorpcClient) SetHeader(key, value string) {
if u.headers == nil {
u.headers = make(map[string]string)
Expand Down

0 comments on commit 7ce2a8f

Please sign in to comment.