Skip to content

Commit

Permalink
[Keys] Remove RawResponse (#17226)
Browse files Browse the repository at this point in the history
* removing RawResponse

* poller removing RawResponse

* keys pollers

* comments on empty structs

* updating readme
  • Loading branch information
seankane-msft committed Mar 4, 2022
1 parent 3aadec6 commit 7f9c0b7
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 114 deletions.
1 change: 1 addition & 0 deletions sdk/keyvault/azkeys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Renamed `ListKeyVersions` to `ListPropertiesOfKeyVersions`
* Removed `Attributes` struct
* Changed `CreateOCTKey`/`Response`/`Options` to `CreateOctKey`/`Response`/`Options`
* Removed all `RawResponse *http.Response` fields from response structs.

## 0.3.0 (2022-02-08)

Expand Down
18 changes: 18 additions & 0 deletions sdk/keyvault/azkeys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,24 @@ log.SetClassifications(log.Request, log.Response)
> CAUTION: logs from credentials contain sensitive information.
> These logs must be protected to avoid compromising account security.
### Accessing `http.Response`
You can access the raw `*http.Response` returned by the service using the `runtime.WithCaptureResponse` method and a context passed to any client method.

```go
import "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"

func GetHTTPResponse() {
var respFromCtx *http.Response
ctx := runtime.WithCaptureResponse(context.Background(), &respFromCtx)
_, err = client.GetKey(ctx, "myKeyName", nil)
if err != nil {
panic(err)
}
// Do something with *http.Response
fmt.Println(respFromCtx.StatusCode)
}
```

### Additional Documentation
For more extensive documentation on Azure Key Vault, see the [API reference documentation][reference_docs].

Expand Down
Loading

0 comments on commit 7f9c0b7

Please sign in to comment.