gowsdl icon indicating copy to clipboard operation
gowsdl copied to clipboard

Possibility to update http header later to http client.

Open JayasuriyanRP opened this issue 3 years ago • 2 comments

Possibility to add http header later to http client. Possibility for assigning Authorization header to http client

JayasuriyanRP avatar Nov 30 '22 15:11 JayasuriyanRP

In my case there is a system in between SOAP server which authenticates with Keycloak and I would need to pass the Authorization token in every call with the fresh token in HTTP Header.

for _, client := range clients {
	allHeaders := make(map[string]string)

	for key, value := range client.GetHttpClientHeaders() {
		allHeaders[key] = value
	}
	allHeaders["Authorization"] = token
	client.SetHttpClientHeaders(allHeaders)
}

JayasuriyanRP avatar Nov 30 '22 16:11 JayasuriyanRP

@c4milo can we merge this I need this functionality as well

all2ham avatar Feb 21 '24 21:02 all2ham