Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 6, 2021 11:36
Show Gist options
  • Save percybolmer/ccd0b72cc9f9d178e86063fe1526d966 to your computer and use it in GitHub Desktop.
Save percybolmer/ccd0b72cc9f9d178e86063fe1526d966 to your computer and use it in GitHub Desktop.
An example of how you can listen on header meta
// lets bind a function to change the counter based on the metadata field
request.on('metadata', function(status) {
// pingCounts are stored in Metadata, and metadata is a key value map
setServerPings(status['ping-counts']);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment