我正在尝试使用 simpleHTTP 从我认为 HTTP 类中的响应类型获取响应代码(200,404 等)到目前为止:
--how to get the http response Int from response
getStatusCode response = print 0
--this works...
--- othercode ---
rsp <- simpleHTTP (defaultGETRequest_ clean_uri)
file_buffer <- getResponseBody(rsp)
--this fails
response = (getStatusCode rsp)