Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

WIP: Make http-api endpoints as specified by the http-api-spec, for the features present in core #69

Merged
merged 14 commits into from
Feb 23, 2016

Conversation

daviddias
Copy link
Member

This is a big PR, still a WIP, it includes:

  • generic
    • being able to start and stop the daemon (graciously using SIGINT)
    • upgrade the http-api to have 2 conns (one for API and the other for gateway)
    • lock the repo if a daemon is being run (a la go-ipfs)
    • update the tests to follow this new pattern
    • merge cli offline and cli with api running tests
    • make the cli use the http-api if it is running
    • add tests with js-ipfs-api for extra level of interop guarantees
  • http-api endpoints that follow with the http-api-spec
    • version
    • id
    • bootstrap
    • config

})

it('get the version', (done) => {
ctl.version((err, result) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

@dignifiedquire I'm hitting an issue here that I would love to have your review. I implemented the http-api endpoint following the spec and you can see the test above (line 17) that it is indeed callable and returns the data as expected, however, the problem is that this js-ipfs-api call is giving me the result as a 'buffer', instead of the object correctly parsed, my first intuition was it was lacking headers, but I confirmed that I was adding the same headers as go-ipfs and still I got nothing. Any ideas? Thank you.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

sweeeet! :D Thank you @dignifiedquire :D

@daviddias daviddias force-pushed the feature/http-api branch 2 times, most recently from 7350c0a to 101b833 Compare February 23, 2016 16:22
daviddias added a commit that referenced this pull request Feb 23, 2016
WIP: Make http-api endpoints as specified by the http-api-spec, for the features present in core
@daviddias daviddias merged commit 180a5e4 into master Feb 23, 2016
@daviddias daviddias deleted the feature/http-api branch February 23, 2016 16:53
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
IPFS is all `dag-pb` yet we allow passing `dag-cbor` as the format of IPLD node to use.  This is likely to break anything that uses it as tools expect IPFS stuff to be `dag-pb`, possibly with `raw` leaves.

Closes ipfs#67

BREAKING CHANGE:

`--format` and/or `--codec` option has been removed from the CLI, the HTTP API and the core API.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants