Skip to content

Commit

Permalink
feat: headers getter for client (#44)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 authored Sep 14, 2024
1 parent b842edb commit dd91d90
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 dd91d90

Please sign in to comment.