null
例外をスローする HTTP 要求があります。
コードは次のとおりです。
public String updateRounds() {
// Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("https://technet.rapaport.com/HTTP/Prices/CSV2_Round.aspx");
// Add your data
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("Username", _user));
nameValuePairs.add(new BasicNameValuePair("Password", _password));
try {
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String response = "";
// Execute HTTP Post Request
try {
response = httpclient.execute(httppost, responseHandler); // it gets
// exception
// here
} catch (Exception e) {
e.getMessage(); // e is null
}
return response;
}
なぜこれが起こっているのか誰にも分かりますか?