Add timeout to JSON request

Can someone please show me how to add a timeout to an JSON request? So for example, how can I add a timeout to this simple request:

app.request.json('', function (data) {

Also, if I do add a timeout then should the request also include a success and error component?

Thanks :grinning:

use app.request(…)