rebase: bump github.com/IBM/keyprotect-go-client from 0.9.1 to 0.9.2

Bumps [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/IBM/keyprotect-go-client/releases)
- [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: github.com/IBM/keyprotect-go-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2022-12-19 20:02:34 +00:00
committed by mergify[bot]
parent 911bc6eabc
commit bbcb0eb83e
8 changed files with 109 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# IBM Cloud Go SDK Version 0.9.1
# IBM Cloud Go SDK Version 0.9.2
# keyprotect-go-client
@ -341,3 +341,34 @@ if err != nil {
}
fmt.Println(keys)
```
### Support for Adding Custom Header
1) From ServiceClient (For Every API Call)
```go
cc := kp.ClientConfig{
BaseURL: "BASE_URL",
APIKey: "API_KEY",
InstanceID: "INSTANCE_ID",
Headers: http.Header{
"Custom-Header": {"Custom-Value"},
},
}
```
2) From ServiceCall (Per API Call)
* Define Header just before the API Call and Empty out when done.
```go
client.Config.Headers = make(http.Header))
client.Config.Headers.Set("Custom-Header", "Custom-Header-Value")
key, err := client.CreateKey(params)
if err != nil {
panic(err)
}
client.Config.Headers = http.Header{}
```