Skip to content
New issue

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

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

Already on GitHub? # to your account

ipfs object put with inputenc option fails for HTTP API #2472

Closed
RichardLitt opened this issue Mar 15, 2016 · 1 comment
Closed

ipfs object put with inputenc option fails for HTTP API #2472

RichardLitt opened this issue Mar 15, 2016 · 1 comment

Comments

@RichardLitt
Copy link
Member

$ curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put&inputenc=json"
HTTP/1.1 400 Bad Request
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: application/json
Server: go-ipfs/0.4.0-dev
Trailer: X-Stream-Error
Date: Tue, 15 Mar 2016 17:44:45 GMT
Connection: close
Transfer-Encoding: chunked

{"Message":"This command can't be called directly. Try one of its subcommands.","Code":1}

This should work, or it should at least display an error specified in ipfs object put, not the default error as if I was using ipfs object alone in the API. What's happening here?

Discovered during documenting in ipfs-inactive/http-api-spec#32.

@RichardLitt RichardLitt added the kind/support A question or request for support label Mar 20, 2016
@RichardLitt RichardLitt added kind/bug A bug in existing code (including security flaws) and removed kind/bug A bug in existing code (including security flaws) kind/support A question or request for support labels Mar 20, 2016
@RichardLitt
Copy link
Member Author

Not a bug - badly formulated URL. My bad.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants