Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Expose the endpoint function to client programs #127

Closed
elelay opened this issue Aug 23, 2016 · 5 comments
Closed

Expose the endpoint function to client programs #127

elelay opened this issue Aug 23, 2016 · 5 comments

Comments

@elelay
Copy link
Contributor

elelay commented Aug 23, 2016

endpoint() is currently not available to client programs.
If they want to make raw queries to the kinto server, using kinto.js, they have no way to use ̀endpoint()` in

var api = collection.api.bucket(collection.bucket).collection(collection.name)
api.client.execute({
 path: endpoint("collection", this.bucket.name, this.name),
 method: "HEAD",
 raw: true,
 headers,
})

They also need to add authentication, but it's the subject of another issue.

elelay added a commit to elelay/kinto-http.js that referenced this issue Aug 27, 2016
@elelay
Copy link
Contributor Author

elelay commented Sep 13, 2016

The code in #133 is wrong, but the discussion might still be of interest.

@plaffitt
Copy link
Contributor

I can't seem to find an endpoint() function, instead I found the object ENDPOINTS in endpoint.ts, containing several functions that allows to build urls. Is this issue still up to date or did the code already changed?

@leplatrem
Copy link
Contributor

This could leverage the endpoint object, for example:

const url = client.endpoints.records(...);

@plaffitt
Copy link
Contributor

My pull requests (#543) has been superseded by #742 and this one has been merged. I think it means that this issue can be closed.

@leplatrem
Copy link
Contributor

Thanks! Let us know if what was done in #742 covers your use-cases!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants