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

params en get y del #103

Open
IGZjavierlazaro opened this issue Feb 28, 2013 · 1 comment
Open

params en get y del #103

IGZjavierlazaro opened this issue Feb 28, 2013 · 1 comment

Comments

@IGZjavierlazaro
Copy link

¿Por qué las funciones get y del no aceptan de entrada p_params? put y post sí lo aceptan

Resource.prototype.get = function(p_path, f_success, f_error) {
    return this.ajax("GET", p_path, null, f_success, f_error);
};

Resource.prototype.del = function(p_path, f_success, f_error) {
    return this.ajax("DELETE", p_path, null, f_success, f_error);
};

Creo que es más cómodo que lo acepten

@ghost
Copy link

ghost commented Feb 28, 2013

To make requests using DELETE verb you should send parameter as path-parameter and adding it may have no sense.

To make GET request I think like you and jQuery

I also think that f_success and f_error can be removed to use the JQ promise returned:

resource.del("book/5").done(onSuccess).fail(onFail);

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

1 participant