ded / reqwest

browser asynchronous http requests
2.94k stars 341 forks source link

Implement timeout #242

Open nodesocket opened 8 years ago

nodesocket commented 8 years ago

I need timeout implemented, i.e. abort the XHR request after a given amount of time.

Should be as easy as setting XMLHttpRequest.timeout.

norfish commented 8 years ago

you can set the timeout in the option, and reqwest is supported.

but you cann't find in the doc

189 commented 7 years ago

Reqwest support 'timeout' . Such as

reqwest({
    url : your_url,
   timeout : 10 * 1000 // 10s
})