Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Options #53

Open
raveendar opened this issue Jun 20, 2016 · 2 comments
Open

Ajax Options #53

raveendar opened this issue Jun 20, 2016 · 2 comments

Comments

@raveendar
Copy link

raveendar commented Jun 20, 2016

I have created the Ajax option and passed to client method

var restAjaxOptions =
{
success : function(jqXHR, textStatus, errorThrown)
{
},
error : function(jqXHR, textStatus, errorThrown)
{
alert(textStatus);
}
};

client.add('postData', {
ajax : restAjaxOptions
});

but the ajax option also got updated for all other methods.

client.add('users'); // the ajax option reflected for this method also even though it is doesn't have any ajax options

Please let us know how to put the ajax option specific to one method alone

@MixailE
Copy link

MixailE commented Sep 15, 2017

Need to change $ .extend (true, new F (), b) to $ .extend (true, {}, new F (), b) in inheritExtend function

@korostel67
Copy link

I experienced the same problem with .add() method and came to the same solution as offered by MixailE.
The defaultOpts should by left untouched as they are "global" for the whole plugin.
Has anybody found any side-effects after such change?
It seams that defaultOpts are only used once in the script, so, there nothing wrong is expected.

And why on earth the defaultOpts are exposed at the end of the script?
#390 Resource.defaults = defaultOpts;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants