Skip to content

Instantly share code, notes, and snippets.

@stevenheidel
Created November 27, 2017 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenheidel/a4de7b87fa4d7ec4817b3fb0b7bf613d to your computer and use it in GitHub Desktop.
Save stevenheidel/a4de7b87fa4d7ec4817b3fb0b7bf613d to your computer and use it in GitHub Desktop.
// Step 1: Take a query param representing a company name / member id pair and parse it
// example: context=Pair(linkedin,456)
Pair<String, Long> companyMember = parseQueryParam("context");
// this should throw an exception if malformed
// Step 2: Do all the stuff in your application
// MOST if not all of your code should live in this area
// Step 3: Convert the parameter back into a String at the very end if necessary
String redirectLink = serializeQueryParam("context");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment