Skip to content

Commit ad5e98c

Browse files
Mayank Pandeygitbook-bot
Mayank Pandey
authored andcommitted
GITBOOK-265: change request with no subject merged in GitBook
1 parent 81d1998 commit ad5e98c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

http-retrieval/README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,31 @@ Currently, there is no payment method or built-in security integrated in the new
1111
Release v1.7.0-rc1 introduced support in `booster-http` for running an [IPFS gateway](https://docs.ipfs.tech/concepts/ipfs-gateway/#overview), which enables Storage Providers to serve content to their users in multiple formats as described below and demonstrated using `curl`.
1212

1313
### Retrieving a full Piece
14+
1415
When performing certain actions, such as replicating deals, it can be convenient to retrieve the entire Piece (with padding) to ensure commp integrity.
1516

1617
```
1718
curl http://{SP's http retrieval URL}/piece/bagaSomePieceCID -o bagaSomePieceCID.piece
1819
```
1920

2021
### Retrieving a CAR file
22+
2123
To return the CAR file for a given CID, you can pass an `Accept` header with the `application/vnd.ipld.car;` format. This can be useful for retrieving the raw, unpadded data of a deal.
2224

2325
```
2426
curl -H "Accept:application/vnd.ipld.car;" http://{SP's http retrieval URL}/ipfs/bagaSomePayloadCID -o bagaSomePayloadCID.car
2527
```
2628

2729
### Retrieving specific files
30+
2831
For Storage Providers that have enabled serving raw files (disabled by default), users can retrieve specific files, such as images by their cid and path where applicable. See [Enable serving files](https://boost.filecoin.io/http-retrieval/serving-files-with-booster-http#enable-serving-files) for a more in depth example.
2932

3033
```
3134
curl http://{SP's http retrieval URL}/ipfs/{content ID}/{optional path to resource} -o myimage.png
3235
```
3336

3437
### Retrieving IPLD blocks
38+
3539
For advanced IPFS and IPLD use cases, you can now retrieve individual blocks by passing an `Accept` header with the `application/vnd.ipld.raw;` format
3640

3741
```
@@ -62,17 +66,17 @@ make booster-http
6266

6367
```
6468
export ENV_BOOST_API_INFO=`boostd auth api-info --perm=admin`
65-
export BOOST_API_INFO=echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'
69+
export BOOST_API_INFO=`echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'`
6670
```
6771

6872
```
6973
export ENV_FULLNODE_API_INFO=`lotus auth api-info --perm=admin`
70-
export FULLNODE_API_INFO=echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'
74+
export FULLNODE_API_INFO=`echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'`
7175
```
7276

7377
```
7478
export ENV_MINER_API_INFO=`lotus-miner auth api-info --perm=admin`
75-
export MINER_API_INFO=echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'
79+
export MINER_API_INFO=`echo $ENV_BOOST_API_INFO | awk '{split($0,a,"="); print a[2]}'`
7680
```
7781

7882
4. Start the `booster-http` server with the above details
@@ -128,4 +132,3 @@ Clients can download a piece using the domain root configured by the SP:
128132
# Download a piece by its CID
129133
curl https://foo.com/piece/bagaSomePieceCID -o download.piece
130134
```
131-

0 commit comments

Comments
 (0)