Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
URL に文字列を追加するにはどうすればよいですか? 例えば:
String Password="123"; String UserName="şlk"; HttpGet httppost = new HttpGet("http://192.168.2.245/getProducts.php?login=1&user_name=UserName&user_pass=Password");
しかし、この方法ではエラーが発生します。どうすれば可能ですか?
+ 演算子で簡単に実行できます
HttpGet httppost = new HttpGet( "URL/getProducts.php?login=1&user_name="+UserName+"&user_pass="+Password);