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

Request object #19

Open
flowersinthesand opened this issue Mar 23, 2012 · 0 comments
Open

Request object #19

flowersinthesand opened this issue Mar 23, 2012 · 0 comments

Comments

@flowersinthesand
Copy link
Owner

The request object using jQuery.Deferred which can accept options such as timeout. This object is extended form of the send method and provides jQuery.ajax style option and interface.

var request = $.socket().request("account:register", {data: account, timeout: 1000});

request.done(function(data) {
    alert("done");
})
.fail(function(reason) {
    alert("failed");
})
.always(function() {
    alert("completed");
});
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