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

Documenting cat with an example in Apiary #3

Open
RichardLitt opened this issue Dec 8, 2015 · 1 comment
Open

Documenting cat with an example in Apiary #3

RichardLitt opened this issue Dec 8, 2015 · 1 comment

Comments

@RichardLitt
Copy link
Collaborator

I'm unsure how to document this adequately.

$ curl -i http://localhost:5001/api/v0/cat?arg=QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH

HTTP/1.1 200 OK
Content-Length: 5
Transfer-Encoding: chunked
X-Stream-Output: 1

test

What is the output of a cat command? What is the mime-type of a chunked file? I don't know, and I'm having difficulty googling it.

Further, cat shouldn't return both content-length and transfer-encoding. See ipfs/kubo#1776 for more on that.

@RichardLitt
Copy link
Collaborator Author

Maybe we should the same thing as in ipfs block:

## get [GET /block/get{?arg}]

Store data as a raw ipfs block.

+ Parameters
    + arg (Multihash, required) - hash of the block to be fetched

+ Response 200 (text/plain)

    + Body

        ```
        hello world
        ```

Block doesn't always have a plain text mimetype, does it? Does cat?

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

No branches or pull requests

1 participant