Skip to content

Commit

Permalink
Merge pull request hooklift#246 from JayasuriyanRP/improvement-allow-…
Browse files Browse the repository at this point in the history
…client-header-update
  • Loading branch information
c4milo authored May 9, 2024
2 parents 039e0b6 + 3bf6b62 commit 992647b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions soap/soap.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,17 @@ func (s *Client) SetHeaders(headers ...interface{}) {
s.headers = headers
}

// Get all currently available http headers from client
// Use case: For setting authentication header
func (s *Client) GetHttpClientHeaders() map[string]string {
return s.opts.httpHeaders
}

// Update Http headers with latest header information
func (s *Client) SetHttpClientHeaders(headers map[string]string) {
s.opts.httpHeaders = headers
}

// CallContext performs HTTP POST request with a context
func (s *Client) CallContext(ctx context.Context, soapAction string, request, response interface{}) error {
return s.call(ctx, soapAction, request, response, nil, nil)
Expand Down

0 comments on commit 992647b

Please sign in to comment.