From 7ce2a8f7a443c7f81fac85634419cfeaeb75bf8c Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 14 Sep 2024 10:29:25 -0400 Subject: [PATCH] feat: headers getter for client 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)