Download Latest Version Add retry count header.zip (31.1 kB)
Email in envelope

Get an email when there's a new version of render-async

Home / 2.1.11
Name Modified Size InfoDownloads / Week
Parent folder
Add retry count header.tar.gz 2021-10-11 21.2 kB
Add retry count header.zip 2021-10-11 31.1 kB
README.md 2021-10-11 606 Bytes
Totals: 3 Items   52.9 kB 0

💇 Custom retry count header support

We added support to pass the retry count to the backend. If you need to pass retry count to the backend, you can pass retry_count_header in render_async's options:

:::erb
<%= render_async users_path,
                 retry_count: 5,
                 retry_count_header: 'Retry-Count-Current' %>

And then in controller, you can read the value from request headers.

:::rb
request.headers['Retry-Count-Current']&.to_i

This was added by @reneklacan in https://github.com/renderedtext/render_async/pull/147, many thanks 🙇

Source: README.md, updated 2021-10-11