docs: Example for customizing fetch requests to trustless gateways#768
docs: Example for customizing fetch requests to trustless gateways#768achingbrain merged 8 commits intoipfs:mainfrom
Conversation
There was a problem hiding this comment.
Please move the example to index.ts of the package, because the README file is generated automatically from it, and will be overwritten in the build.
For example, for the dag-json package, this is the source:
helia/packages/dag-json/src/index.ts
Lines 1 to 26 in 7e32123
- Make sure the style is consistent by using
npx aegir lintandnpx aegir lint -- --fix - To generate the readme run
npx aegir docs
Also left some comments in line.
|
Hi @2color, I’ve also added the example for |
|
Hi @2color , |
|
Hi @2color, |
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
|
Hi @2color @SgtPooki ,
You can verify the working example at: https://github.com/Dhruv-Varshney-developer/test-example-helia I've also updated the CID in the example to use The PR is now ready for review. |
Title
docs: Example for customizing fetch requests to trustless gateways
Description
Add example code to the
packages/block-brokers/README.mddemonstrating how to customize the fetch requests sent to trustless gateways using thetransformRequestInitoption.This shows how to add authentication headers (such as JWT tokens) when using theTrustlessGatewayBlockBroker.Completes #757 .
Notes & open questions
Change checklist