Home > Archives > 2006年08月09日

2006年08月09日

今日のはまりどころ

したのコードでは POST のメッセージが飛ばない.

		URLConnection con = new URL(path).openConnection();
		con.setDoOutput(true);
		con.setDoInput(false);
		PrintWriter pw = new PrintWriter(con.getOutputStream());
		pw.println(path + " " + con);
		pw.flush();
		pw.close();
		System.out.println(path + " " + con);

どうやら InputStream を開いてやらないとサーバに POST のメッセージすら送ってくれないらしい.これに気づくのにかなりの時間を喰った… が,あとすこしなのでがむばろう.

Home > Archives > 2006年08月09日

Search
Feeds

Page Top