Cannot write URLConnection because of doOutput

后端 未结 3 1831
独厮守ぢ
独厮守ぢ 2021-02-20 07:11

I\'ve asked a question here and I\'ve fixed my problem thanks to an user. This is the code I am using at the moment.

void UploadToDatabase() throws MalformedURLE         


        
3条回答
  •  萌比男神i
    2021-02-20 08:07

    For me it was due to incorrect way of using header, like

    HttpEntity entity = new HttpEntity("parameters", headers); //Issue was here
    

    I just made as

     HttpEntity entity = new HttpEntity(headers); //Fixed Issue
    

    check here other details

提交回复
热议问题