Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

request-api allow the http method to be specified #551

Closed
wants to merge 2 commits into from

Conversation

kumavis
Copy link
Contributor

@kumavis kumavis commented May 6, 2017

via options.method = 'GET'

to conform to the spec
@kumavis kumavis mentioned this pull request May 6, 2017
4 tasks
@kumavis kumavis requested a review from daviddias May 6, 2017 22:48
@kumavis
Copy link
Contributor Author

kumavis commented May 6, 2017

not sure if test failure is related...

  1 failing
  1) .files callback API .add .createAddStream stream of valid files and dirs:
     Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

@daviddias
Copy link
Contributor

What was the issue you were having? CORS related?

@kumavis
Copy link
Contributor Author

kumavis commented May 7, 2017

@diasdavid Parity only supports GET for block/get per ipfs/http-api-spec
https://github.com/ipfs/http-api-spec/blob/master/apiary.apib#L807

@daviddias
Copy link
Contributor

ah, I see. Well, would it be fine for parity to support just method * for now on that one? I feel that it is easier to make it mimic what go-ipfs does than having to remember everyone to set the method for this specific call.

@kumavis
Copy link
Contributor Author

kumavis commented May 9, 2017

can we either:

  1. change the spec or
  2. adhere to the spec

@kumavis
Copy link
Contributor Author

kumavis commented May 9, 2017

I feel that it is easier to make it mimic what go-ipfs does

go-ipfs and js-ipfs both handle this method when made as a GET request

@kumavis
Copy link
Contributor Author

kumavis commented May 9, 2017

@kumavis
Copy link
Contributor Author

kumavis commented May 9, 2017

since parity only implements the single route (block/get) I'll just hit that manually and drop js-ipfs-api in the datastore adapter

@kumavis kumavis closed this May 9, 2017
@kumavis kumavis deleted the http-method-patch1 branch May 9, 2017 04:53
@Kubuxu Kubuxu removed the in progress label May 9, 2017
@daviddias
Copy link
Contributor

on #551 (comment)

We've a lot to do in that land - https://github.com/ipfs/http-api-spec/issues/116

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.

3 participants