Skip to content

Instantly share code, notes, and snippets.

@johnbeadle
Last active August 24, 2017 16:42
Show Gist options
  • Select an option

  • Save johnbeadle/e4c5ea15033bc1b6ab0f136b7354792a to your computer and use it in GitHub Desktop.

Select an option

Save johnbeadle/e4c5ea15033bc1b6ab0f136b7354792a to your computer and use it in GitHub Desktop.
setting params as HashMap
Map<String, String> postData = new HashMap<>();
postData.put("sub", user.sub);
postData.put("exp", user.tokenExpirationInMinutes);
postData.put("fname", user.firstname);
postData.put("lname", user.lastname);
postData.put("email", user.email);
new JSONTask(postData).execute("/api/token/");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment