Android, send and receive XML via HTTP POST method

后端 未结 3 1119
臣服心动
臣服心动 2020-12-05 12:04

There is a relevant question, but I could not get the answer clearly.

I would like to POST a short xml code



        
3条回答
  •  遥遥无期
    2020-12-05 12:56

    You can get the content of the response using:

    String responseXml = EntityUtils.toString(httpResponse.getEntity());
    

    You can then write this to a file using something like this.

    there is something wrong with receiving the response

    Since you havn't said what is wrong with receiving the response it's somewhat difficult to help you with this point.

提交回复
热议问题