Skip to content

Instantly share code, notes, and snippets.

@nidri
Created February 8, 2022 15:00
Show Gist options
  • 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