Comments (3)
okay finally i know how to create additional header,
this is my code :
RESTstop.add('account/create', function() {
console.log(this.request.headers.email);
console.log(this.request.headers.password);
Accounts.createUser({
email : this.request.headers.email,
password : this.request.headers.password
});
return [200,{
success : true,
message : "Account has created"
}];
});
i have two additional header, that are email and password,
but i still don't know how to add entity like json
in postman we can choose post and choose raw
from reststop2.
whoaaa finally i meet the solution,
first add to header
Content-Type: application/json
and add your json as usual,
and how to get the json?
simple, just use
this.params
the json already be a js object.
you really genius. sorry for my newbieness π―
from reststop2.
No problem! Glad you figured it out.
from reststop2.
Related Issues (20)
- RESTstop.apply donβt work HOT 3
- realtime live data using rest? HOT 2
- Raw Post Data HOT 4
- Readable JSON HOT 6
- * not working for catch-all route HOT 6
- Request Entity Too Large HOT 2
- Get reststop2 ready for Meteor 0.8.x (blaze) HOT 2
- Unexpected error. HOT 8
- Get 'Unknown error' when returning array of results
- Allow app and package to depend on reststop2 HOT 2
- if(this.params.user.indexOf('@') == -1) { "message": "Cannot call method 'indexOf' of undefined" HOT 2
- Signup call for account creation HOT 5
- srp removed from Meteor 0.8.2 HOT 7
- just add content-type if none present HOT 1
- login with reststop2 HOT 6
- bcrypt login problem HOT 2
- Add support for pluggable authentication
- POST XMLHttpRequest Failed HOT 2
- Sending File HOT 2
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 reststop2.