Skip to content

Instantly share code, notes, and snippets.

@nidri
Created February 8, 2022 15:00
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 nidri/4db50f71cbf36037c8b6eeca1c8703df to your computer and use it in GitHub Desktop.
Save nidri/4db50f71cbf36037c8b6eeca1c8703df to your computer and use it in GitHub Desktop.
Set custom cookie in Pega PRPC in Java step
// Cookie has to be set on 'set_cookie' property on pyHttpResponseHeaders on pxRequestor page
try {
tools.getRequestor().getRequestorPage().getPage("pyHTTPResponseHeaders").putString("set_cookie", "PegaCustomCookie= someCookieValue; Path=/prweb; Secure; HttpOnly;");
}
catch(Exception e) {
oLog.error("Exception while setting custom cookie" + e.getMessage());
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment