Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.         String username = jTextField1.getText();
  2.         String password = new String(jPasswordField1.getPassword());
  3.        
  4.         //place username and password into a json object to be sent to server
  5.         JSONObject data = new JSONObject();
  6.         data.put("user_ID", username);
  7.         data.put("pwd", password);
  8.        
  9.         //api endpoint for login check
  10.        
  11.         String uri = "https://identiphoto.azurewebsites.net/api/AuthenticatePhotographer";
  12.         try {
  13.             URL url = new URL(uri);
  14.         } catch (MalformedURLException ex) {
  15.             Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
  16.         }
  17.        
  18.         //TODO: send the JSON object to url...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement