Comments (3)
Hey Satya,
- This is definitely something that needs to be added to Restivus. I'm sure you're already aware of the http-publish package that has this functionality. I have a few other things that are higher priorities for me (e.g., additional testing, route/endpoint versioning, and JSON PATCH support), but if someone wants to add it I will gladly work on hashing out an acceptable API with them or I will happily accept a pull request if someone would like to be extra ambitious. I just know that it's going to take a couple of weeks of work to design and implement a clean API that plays nicely with everything else, and I need those other features I named for my own API asap. I went ahead and added the feature to the roadmap, but it may be more than a month before I get around to implementing this.
- I've used Meteor methods in multiple endpoints, including authenticated endpoints. In my situation, I'm calling through to the method from within the endpoint. Are you talking about just applying the entire Meteor method as the endpoint function? That I haven't tried. If there is an easy way to add this to the API I will do it, but otherwise it will probably be fairly low priority since it's probably only saving a single line of code to call through to the method from within the endpoint (if I understand you correctly). Here's an example of what I do that works with authenticated endpoints:
Restivus.addRoute 'test', authRequired: true,
get: ->
Meteor.call('someMeteorMethod', @userId, arg2)
from meteor-restivus.
Working on a package that has this as its main feature here: https://github.com/stubailo/meteor-rest
Hoping to have a first version out on Tuesday, but until then here is a hackpad with design and discussion: https://meteor.hackpad.com/Meteor-Hack-Week-REST-APIs-with-Meteor-XK2NNXqhUvj
from meteor-restivus.
@stubailo's simple:rest
package (referenced above) is designed specifically for this, so I have no plans to provide any additional functionality for it in Restivus. I'm open to debate as always, but I'm going to go ahead and close this for now.
from meteor-restivus.
Related Issues (20)
- Restivus is not a constructor HOT 1
- Restivus.configure is not a function
- HTTP.call inside api issue
- Is it possible to read Content-type: text/plain data HOT 3
- Simple question: Mutual or two way certificate authentication
- First Logging in is not required when using meteor restivus HOT 1
- How to consume a REST api that needs username/password authentication in node.js HOT 1
- onLogInFailure
- Getting 400 Bad Request on Mup Deployed
- Try login with user who does not have password, crashes server
- API should close connection by default HOT 2
- Need corsHeader configurations for CORS
- Role permissions don't work with meteor-roles v3
- Unable to upload multipart file
- Upload multipart file
- Support Meteor 2.3 HOT 1
- Meteor 2.3 not supported HOT 2
- Reason: CORS header ‘Access-Control-Allow-Origin’ missing
- CORS header ‘Access-Control-Allow-Origin’ missing if http status code is not 200
- URL params issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-restivus.