Advertisement
Guest User

Untitled

a guest
Nov 13th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. URL url = new URL("ТУТСАЙТ.com");
  2. HttpsURLConnection urlConnection = (HttpsURLConnection)url.openConnection();
  3. urlConnection.setRequestProperty("Content_type", "application/json");
  4. urlConnection.setRequestMethod("POST");
  5. urlConnection.setDoInput(true);
  6. urlConnection.setDoOutput(true);
  7. urlConnection.connect();
  8. JSONObject jsonObject = new JSONObject();
  9. jsonObject.put("username", s1);
  10. jsonObject.put("password", s2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement