Capture Cookie from external URL Synchronous
Need to call external URL (http://myserver.somwhere.com/share/?key=xyz) and return cookie (token) from external site.
The following code below returns no cookie and no errors. It returns body but no cookies. Please advise. Thank you, Nick
Environment: PT 8.49.21
Local Message &req, &res;
&url = GetURL(URL.BASIC_WEB_AUTH);
&req = CreateMessage(Message.IB_GENERIC);
&req.IBInfo.IBConnectorInfo.ConnectorClassName = "HttpTargetConnector";
&BasicAuthorizationEncrypted = GetURL(URL.BASIC_WEB_AUTH);
&BasicAuthorizationDecrypted = Decrypt("", &BasicAuthorizationEncrypted);
&b = &req.IBInfo.IBConnectorInfo.AddConnectorProperties("URL", &url, %HttpProperty);
&b = &req.IBInfo.IBConnectorInfo.AddConnectorProperties("Method", "GET", %HttpProperty);
&b = &req.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-Type", "text/html; charset=utf-8", %Header);
&b = &req.IBInfo.IBConnectorInfo.AddConnectorProperties("Authorization", &BasicAuthorizationDecrypted, %Header);