Skip to content

Commit

Permalink
gateway: car params and Content-Location
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Apr 17, 2024
1 parent b94f597 commit 1defdd3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/http-gateways/path-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,23 +254,23 @@ A Gateway SHOULD include the

### `dag-scope` (request query parameter)

Only used on CAR requests, same as :ref[dag-scope] from :cite[trustless-gateway].
Optional, can be used to limit the scope of verifiable DAG requests such as CAR, same as :ref[dag-scope] from :cite[trustless-gateway].

### `entity-bytes` (request query parameter)

Only used on CAR requests, same as :ref[entity-bytes] from :cite[trustless-gateway].
Optional, can be used to limit the scope of verifiable DAG requests such as CAR, same as :ref[entity-bytes] from :cite[trustless-gateway].

### `car-version` (request query parameter)

Only used on CAR requests, same as :ref[car-version] from :cite[trustless-gateway].
Optional, specific to CAR requests, same as :ref[car-version] from :cite[trustless-gateway].

### `car-order` (request query parameter)

Only used on CAR requests, same as :ref[car-order] from :cite[trustless-gateway].
Optional, specific to CAR requests, same as :ref[car-order] from :cite[trustless-gateway].

### `car-dups` (request query parameter)

Only used on CAR requests, same as :ref[car-dups] from :cite[trustless-gateway].
Optional, specific to CAR requests, same as :ref[car-dups] from :cite[trustless-gateway].

# HTTP Response

Expand Down
23 changes: 16 additions & 7 deletions src/http-gateways/trustless-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,27 @@ returned:

### :dfn[`car-version`] (request query parameter)

Only used on CAR requests, it is the same as [CAR version](#car-version) content
type parameter. In case both are present, the value in the HTTP Header has priority.
Optional, only used on CAR requests.

Serves same purpose as [CAR `version` content type parameter](#car-version-content-type-parameter).

In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.

### :dfn[`car-order`] (request query parameter)

Only used on CAR requests, it is the same as [CAR `order`](#car-order-content-type-parameter)
content type parameter. In case both are present, the value in the HTTP Header has priority.
Optional, only used on CAR requests.

Serves same purpose as [CAR `order` content type parameter](#car-order-content-type-parameter).

In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.

### :dfn[`car-dups`] (request query parameter)

Only used on CAR requests, it is the same as [CAR `dups`](#car-dups-content-type-parameter)
content type parameter. In case both are present, the value in the HTTP Header has priority.
Optional, only used on CAR requests.

Serves same purpose as [CAR `dups` content type parameter](#car-dups-content-type-parameter).

In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.

# HTTP Response

Expand Down Expand Up @@ -249,7 +258,7 @@ A CAR stream for the requested
content type (with optional `order` and `dups` params), path and optional
`dag-scope` and `entity-bytes` URL parameters.

## CAR version (content type parameter)
## CAR `version` (content type parameter)

Value returned in
[`CarV1Header.version`](https://ipld.io/specs/transport/car/carv1/#header)
Expand Down

0 comments on commit 1defdd3

Please sign in to comment.