Adding support for POST requests on the importer #191

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

I've added support for POST requests on remote importers (by passing the type and postData parameters to the importer). It's a small change which might help?

The && AND op makes 'type' only take when one specifies postData as well -- which isn't absolutely necessary.
Better would be to nest these conditions: if type==POST then: { set type=POST; override data with postData }

src/importers/remote.js
@@ -11,6 +11,8 @@
* extract - a method to pass raw data through before handing back to parser.
* dataType - ajax datatype
* jsonp - true if it's a jsonp request, false otherwise.
+ * type - wether to do a post or a get request (defaults to 'GET')
+ * postData - The post data to send with the request
@iros

iros Jan 10, 2013

Owner

Can you change the name of this property to 'data' which is consistent with the parameter types used in jQuery (and thus are well known.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment