mythz/jquip

jQuip.ajax doesn't accept the same arguments as jQuery

Closed this issue · 3 comments

Hi, I've just started using jquip and am liking it! I noticed that the way $.ajax works in jQuip is slightly different to jQuery:

from http://api.jquery.com/jQuery.ajax/ :

jQuery.ajax( url [, settings] )

url A string containing the URL to which the request is sent.

settings A set of key/value pairs that configure the Ajax request. All settings are optional.

jQuip doesn't let you supply a URL as the first argument - it has to be supplied as part of the settings object. You get a fatal error if you use the jQuery syntax.

I'm not too fussed about whether or not you want to mirror this behaviour - but if not, it would be helpful to have a note about this in the readme, saying that the accepted arguments are different to jQuery?

Yep we try to stay as close the jQuery API as possible but remove all the corner api uses we think are rare and just add bloat. Though the Ajax API mismatch was an oversight since the ajax module was a re-write.

We've just added and deployed support for the url as a first parameter.
http://www.servicestack.net/jqbuilder/

Pull requests for missing pieces like this is appreciated :)

Thanks for the feedback!

That was quick, thanks!

Regarding pull requests (I'm fairly new to github) - do they need to also contain updated min.js and closure-advanced.js files?

Just the src file is needed. I can re-gen the .min and .closure-advanced.js files on my end.

Thanks.