From 4531510d018b60dfec18b77009b3c4a0f0d079ae Mon Sep 17 00:00:00 2001 From: beldeveloper Date: Thu, 3 Feb 2022 18:57:22 +0100 Subject: [PATCH] fix: do not set SOAPAction header if the value is empty; some APIs reject this header --- soap.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soap.go b/soap.go index 578213b..9535ff3 100644 --- a/soap.go +++ b/soap.go @@ -242,7 +242,9 @@ func (p *process) doRequest(url string) ([]byte, error) { req.Header.Add("Content-Type", "text/xml;charset=UTF-8") req.Header.Add("Accept", "text/xml") - req.Header.Add("SOAPAction", p.SoapAction) + if p.SoapAction != "" { + req.Header.Add("SOAPAction", p.SoapAction) + } resp, err := p.httpClient().Do(req) if err != nil {