Web サービスPOST
へのアクセス方法を知る必要があります。チュートリアルHTTPS
を実行しましたが、古すぎるため役に立ちませんでした。
誰かが私に良いチュートリアルやサンプルコードを教えてくれませんか?
Apache HttpClientライブラリを試してください。httpsをサポートしています。
このようなもの:
URL url = new URL("https://...");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod("POST");
//write the request body
OutputStream requestBody = connection.getOutputStream();
...
requestBody.flush();
//send the request and get the response body
InputStream responseBody = connection.getInputStream();
...