HI all
I'm trying to write a function that gives me the HTTP code in Int

--This is broken
getStatusCode::Response->String
getStatusCode (Response _,x1,_,_) = x1

--this work the download  trying to get http status code as well
download_file fname url= do
let clean_uri = check_url url
putStrLn ("Downloading " ++ url ++ "...")
rsp <- simpleHTTP (defaultGETRequest_ clean_uri) 
--problamatic function next line
                                                        print (getStatusCode rsp)
file_buffer <- getResponseBody(rsp)
B.writeFile fname file_buffer
Best Regards

Jacques