Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generalize content-type in reframe spec #275

Merged
merged 2 commits into from
Jun 7, 2022
Merged

generalize content-type in reframe spec #275

merged 2 commits into from
Jun 7, 2022

Conversation

petar
Copy link
Contributor

@petar petar commented Apr 8, 2022

I think the content-type in the REFRAME API spec should not be viewed as a part of the specific REFRAME API, but rather as a part of the RPC networking framework that the REFRAME API uses. I.e. there may be other APIs that use the same networking RPC stack. Consequently, the content-type should identify the networking framework itself rather than make a reference to the reframe API. So I am proposing we rename it from application/vnd.ipfs.reframe+dag-json; version=1 to application/vnd.ipfs.http+dag-json; version=1.

@petar petar requested a review from aschmahmann April 8, 2022 16:35
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies if this is a naive question (late friday, but afraid I will forget to ask on monday)

If we want to indicate it is a "generic RPC for IPFS", wouldn't application/vnd.ipfs.rpc+dag-json; version=1 do the trick?

My thinking: if we have something other than HTTP, let's say WebTransport at some point (ipfs/in-web-browsers#190), what would be the difference between below two?

  • application/vnd.ipfs.http+dag-json; version=1
  • application/vnd.ipfs.webtransport+dag-json; version=1

Do we send the same dag-json in both cases, no matter if we use HTTP or WebTransport?
If so, what is the value added by having separate types?

@petar
Copy link
Contributor Author

petar commented Apr 11, 2022

Apologies if this is a naive question (late friday, but afraid I will forget to ask on monday)

If we want to indicate it is a "generic RPC for IPFS", wouldn't application/vnd.ipfs.rpc+dag-json; version=1 do the trick?

My thinking: if we have something other than HTTP, let's say WebTransport at some point (ipfs/in-web-browsers#190), what would be the difference between below two?

  • application/vnd.ipfs.http+dag-json; version=1
  • application/vnd.ipfs.webtransport+dag-json; version=1

Do we send the same dag-json in both cases, no matter if we use HTTP or WebTransport? If so, what is the value added by having separate types?

This is a good question. In fact, since the content-type describes the encoding (dag-json) and the semantics (rpc), and not the transport (http or webtransport), the string should indeed probably just be application/vnd.ipfs.rpc+dag-json; version=1. Good call!

REFRAME.md Outdated Show resolved Hide resolved
Co-authored-by: Marcin Rataj <[email protected]>
@lidel lidel merged commit 80f7c74 into main Jun 7, 2022
@lidel lidel deleted the reframe branch June 7, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants