1
我正在从android中的AsyncTask向服务器发出HTTP post请求发布请求。Android中的Mange HTTP响应
我在管理响应时遇到的问题。在这里我如何阅读回复。
HttpEntity entity =response.getEntity();
if (entity != null) {
DataInputStream in = new DataInputStream(entity.getContent());
String str;
while ((str = in.readLine()) != null){
Log.e("Debug","Server Response second url"+str);
}
in.close();
}
的问题是我收到的作品的反应,但我希望他们在一块
电流响应
Server Response second url
Server Response second url<header><status>Success</status><message>Check the Numbers:
Server Response second url123456.</message><vbal>5005</vbal></header>
预期的响应
<header><status>Success</status><message>Check the Numbers:123456.</message><vbal>5005</vbal></header>
如果我将它在一块我可以轻松解析xml响应并获取所需的值。