Here is a quick example where we execute the @baseclass.pyUtilityStub activity via an HTTP request using the POST method. In addition, we pass five parameters to that activity, three of them are passed in the query URL and the other two are passed in the body of the POST request. Note that we can pass the pzPrimaryPageName parameter to set its primary page.
var oSafeURL = new SafeURL("@baseclass.pyUtilityStub");
oSafeURL.put("pzPrimaryPageName", "pyWorkPage");
oSafeURL.put("parameterGet1", "valueGet1");
oSafeURL.put("parameterGet2", "valueGet2");
var postData = new SafeURL();
postData.put("parameterPost1", "valuePost1");
postData.put("parameterPost2", "valuePost2");
pega.u.d.asyncRequest("POST", oSafeURL, null, postData);