2015-12-08 124 views
0
http::geturl "http://xxxx:8080/api/security/oauth2/token" \ 
     -headers {} -method POST -type application/x-www-form-urlencoded \ 
     -query username=admin&grant_type=password&password=admin&client_id=security-service 

我有上述tcl http request如何取消tcl http請求

請建議如何取消request如果response time很大?

謝謝。

回答

1

聲明:我沒有嘗試過這個我自己。

望着http documentation,我想你應該在你的初使http::geturl呼籲防止永遠掛着如果有什麼奇怪的事情發生你的應用程序指定-timeout flag

回答您的原始問題,似乎要取消請求,您應該致電http::reset傳遞由原始http::geturl調用返回的令牌。當然,除非您還指定-command,在這種情況下,令牌將被傳遞到您指定的腳本,直到請求完成後纔會返回給您。