Skip to content

Commit

Permalink
Add example for the custom User-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-mdr committed Oct 25, 2022
1 parent f4625f6 commit bc9eec5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
5 changes: 5 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Examples
Here are some examples to use this SDK:
- [osc-viewer](https://github.com/outscale-dev/vscode-osc-viewer): an official vscode plugin using the SDK
- [node-volumes](node-volumes/README.md): a node application
- [web-vms](web-vms/README.md): a web application
32 changes: 15 additions & 17 deletions examples/node-volumes/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions examples/node-volumes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ async function getVolumes(accessKey: string, secretKey: string, region: string):
secretAccessKey: secretKey,
service: "api",
region: region,
},
// You can change the User-Agent like that
headers: {
"User-Agent": "node-volumes"
}
});
const readParameters : osc.ReadVolumesOperationRequest = {
Expand Down

0 comments on commit bc9eec5

Please sign in to comment.