Android Question HTTP SetHeader Problem

fabio borges

Member
Licensed User
Longtime User
Hi everybody,

I'm having a problem with httpclient setheader. When I set the post header "Content-Length" I get a null response error from the server. If I dont set


vUrl = "http://sigensvc.cidasc.sc.gov.br/AtualizacaoSaldoAnimais/Incluir"
HTTPReq.InitializePost2(vUrl,vPost.GetBytes("UTF8"))
HTTPReq.SetHeader("Content-Length","631")
HTTPReq.SetHeader("Cookie", "SessionID="&vSessionID&"; UserAuth="&vUserAuth)
HTTPReq.SetHeader("Connection","keep-alive")
HTTPReq.SetContentType("application/xml")
HTTPReq.Timeout = 100000
HTTPCli.Execute(HTTPReq,2)
 
Top