1. Jon Tzeng
  2. PowerServer 2020 or older (Obsolete)
  3. Tuesday, 20 August 2019 21:32 PM UTC

I am trying to open a https site with POST method to include ID and password to access the https site and open the site on the default internet browser. The POST I tried to use HttpClient and sendRequest method. But I cannot make it works. The return code from SendRequest is -2. 

Is there a sample code that I can use? We is using PowerBuilder 2017 R3 and deploy the code as a web application in PowerServer.

Thanks, 

Jon

Jon Tzeng Accepted Answer Pending Moderation
  1. Friday, 23 August 2019 19:13 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Mark,

Thank you for respond. We use PB 2017 R3. Is httpClient only on PB 2019? Does HyperLinkToURL support https?

Jon

Comment
  1. Jon Tzeng
  2. Thursday, 5 September 2019 14:05 PM UTC
Hi Chris,



Are you give me a example on how to do it? The functions on httpclient object seem don't have one can display a web page.



Thanks,



Jon
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 5 September 2019 15:28 PM UTC
Hi Jon;

The HTTPClient can only POST with a RESTFul Web Service. No Internet browser interaction is possible with that object class. You would need to use the iNET object for that. The iNET object has the POSTURL() command but cannot support HTTPS communication though.

I think that your best hope might be to use a 3rd party control at this time for this type of implementation.

FYI: https://www.example-code.com/powerbuilder/http_post_json.asp

Regards ... Chris
  1. Helpful
  1. Jon Tzeng
  2. Friday, 6 September 2019 14:29 PM UTC
Hi Chris,



Thank you for those information.



Jon
  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 21 August 2019 05:45 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Jon,

  1. Please check whether your PowerServer version is 2019. If not, then the httpclient object is not supported, you must upgrade to version 2019 first.
  2. We suggest that you use the HyperLinkToURL function of inet object to implement the functionality.

https://www.appeon.com/support/documents/appeon_online_help/pb2019/features_help_for_appeon_web/ch05s02s01.html#InetObject

But the ID and password parameters might can't be used in this functionality. If your web link contains those parameter settings (see the example below), this should not be a problem. 

For example: http://192.0.1.94:8080/MyTest/index.html?user=appeon&password=appeon

I guess you might need this help about single sign-on, you can refer to the link below for more details:

https://www.appeon.com/support/documents/appeon_online_help/pb2019/workarounds_and_api_guide/ch06s10.html

 

Regards,

Mark Lee

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.