0
我有下面的代碼在Groovy:如何使用Groovy/Java中的URL執行簡單請求?
def http = new HTTPBuilder('http://localhost:8080')
http.post(path: '/this/is/my/path/'+variable) { resp ->
println "POST Success: ${resp.statusLine}"
assert resp.statusLine.statusCode == 200
}
我只想要執行這一要求。我在另一個應用程序中有一個方法,當該URL中有請求時,我看到一個結果。問題是我什麼都看不到。
可能是什麼問題?
謝謝你的狀態回調,但我繼續不與無響應 –