android平台HttpGet、HttpPost请求实例

2019-12-10 20:05:32于海丽

                resultText.setText(strResult);  
            }else{  
                resultText.setText("请求错误!");  
            }  
        }catch (ClientProtocolException e){  
            resultText.setText(e.getMessage().toString());  
        } catch (IOException e){  
            resultText.setText(e.getMessage().toString());  
        }catch (Exception e){  
            resultText.setText(e.getMessage().toString());  
        }   
    }  
}