Skip to content

Commit

Permalink
fix examples of push gateway in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfussion authored and zbjornson committed Dec 8, 2022
1 parent a6e3510 commit 15babd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -491,21 +491,21 @@ const client = require('prom-client');
let gateway = new client.Pushgateway('http://127.0.0.1:9091');

gateway.pushAdd({ jobName: 'test' })
.then({resp, body} => {
.then(({resp, body}) => {
/* ... */
})
.catch(err => {
/* ... */
})); //Add metric and overwrite old ones
gateway.push({ jobName: 'test' })
.then({resp, body} => {
.then(({resp, body}) => {
/* ... */
})
.catch(err => {
/* ... */
})); //Overwrite all metrics (use PUT)
gateway.delete({ jobName: 'test' })
.then({resp, body} => {
.then(({resp, body}) => {
/* ... */
})
.catch(err => {
Expand All @@ -514,7 +514,7 @@ gateway.delete({ jobName: 'test' })

//All gateway requests can have groupings on it
gateway.pushAdd({ jobName: 'test', groupings: { key: 'value' } })
.then({resp, body} => {
.then(({resp, body}) => {
/* ... */
})
.catch(err => {
Expand Down

0 comments on commit 15babd5

Please sign in to comment.