Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
feat(retry): report retry attempt number as extra header
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 4, 2017
1 parent 2b04494 commit fd50927
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ function remoteFetch (uri, opts) {
return retry((retryHandler, attemptNum) => {
const req = new fetch.Request(uri, reqOpts)
return fetch(req).then(res => {
res.headers.set('x-fetch-attempts', attemptNum)
if (opts.integrity) {
const oldBod = res.body
const newBod = ssri.integrityStream({
Expand Down

0 comments on commit fd50927

Please sign in to comment.