From dd91d904bf03d386167435ea12534872c354bfef Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 14 Sep 2024 10:53:13 -0400 Subject: [PATCH] feat: headers getter for client (#44) Signed-off-by: Chris Gianelloni --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index bee34aa..c5c19a2 100644 --- a/main.go +++ b/main.go @@ -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)