Reaction Commerce Forums

RC with meteor:REST


I want to test methods and publications of RC with rest requests through simple:rest, but
"ReferenceError: SimpleRest is not defined" occurred when i attempt call SimpleRest method in RC code, though simple:rest has already been correctly installed and GET requests to publications are normally,
please, what is wrong?
correct way to do this?


SimpleRest is a server-only method. Are you possibly running it on the client?


If all you’re doing is testing methods and publications, you can also use the native DDP interface…

in your browser console:'methodName', methodOptions, function(error, result) {

You can use the Meteor Dev Tools for Chrome to analyze subscription (and method) traffic.

Or for testing all of the above and a lot more, you could use something like Meteor Toys.


thank for useful info about DDP and tools…

i want transfer product catalog from Google Sheet through http simple:rest.
But methods.js from reaction-catalog/server/ don’t sees SimpleRest,
i do include
import { SimpleRest } from ‘meteor/simple:rest’;
now "Cannot read property ‘SimpleRest’ of undefined"
some sort of error in importing?
i don’t find “simple:rest” package in ./meteor/packages, to see exports,
can you help?


@orloff Doesn’t look like you’d need to import SimpleRest. You should just be able to use SimpleRest as a global.


through api.use() ?
i did, error disappears