Closed harshit777 closed 1 year ago
Support for Adding Custom Header.
1) From ServiceClient
cc := kp.ClientConfig{ BaseURL: "", APIKey: "", InstanceID: "", Headers: http.Header{ "Custom-Header": {"Custom-Value"}, }, }
2) From ServiceCall (Per API)
Define Header just before the API Call and clear it after call
client.Config.Headers = make(http.Header) client.Config.Headers.Set("Custom-Header", "Custom-Header-Value") key, err := client.CreateKey(context.Background(), "NewKey", nil, true) if err != nil { panic(err) } client.Config.Headers = http.Header{}
Test Results
1) API Calls
2) Client Call
Integration Test :
Issue : https://github.ibm.com/kms/kmk/issues/1485
:tada: This PR is included in version 0.9.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Support for Adding Custom Header.
1) From ServiceClient
2) From ServiceCall (Per API)
Define Header just before the API Call and clear it after call