1. Piero Salandin
  2. PowerBuilder
  3. Wednesday, 19 July 2023 12:31 PM UTC

Hi there!

In PowerBuilder 2019 R3 I am using a "normal" HttpClient object to access a service fulkly accessible by PostMan, but from PowerBuilder I get an undocumented return code of 3. Not -3, but +3 instead.

The main problem is to understand what does that "3" return value stand for.
I really don't know how to do.

The postman call is very simple:

  • POST
  • Normal default headers, content-type is application/json
  • the body is   {"parentId": 5097,"onlyFolders": true}
     
  • there is a basic authorization

 

The PowerBuilder Code is the following:

// is_auth_token is the basic authorization token 
// is_useragent is a normal string, I tried aklso with the Postman's one
// ls_url is the url with which I connect with PostMan too

ls_json = '{"parentId": 5097,"onlyFolders": true}'
ll_len = Len(ls_json)
lnv_http = create httpClient
lnv_http.ClearRequestheaders()
lnv_http.Timeout = 5
lnv_http.SetRequestheader("Accept", "application/json")
lnv_http.SetRequestheader("Connection", "keep-alive")
lnv_http.SetRequestheader("Content-Type", "application/json")
lnv_http.SetRequestheader("Content-Length", String(ll_len))
lnv_http.SetRequestheader("User-Agent", is_useragent)
lnv_http.SetRequestheader("Authorization","Basic "+is_auth_token)

li_rc = lnv_http.SendRequest("POST", ls_url, ls_json)

 

Best regards
Piero Salandin
Office Information Technologies

 

Piero Salandin Accepted Answer Pending Moderation
  1. Friday, 21 July 2023 14:03 PM UTC
  2. PowerBuilder
  3. # 1

Hello everybody!

Finally I found an answer using PB2022.

What in PB2019 R3 returns 3 in PB2022 returns a "correct" negative error code of -19, meaning that the TLS 1.3 Protocol is not supported.

Comment
  1. Chris Pollach @Appeon
  2. Friday, 21 July 2023 14:30 PM UTC
Hi Piero ... great detective work - thanks for the update! :-)
  1. Helpful
There are no comments made yet.
Piero Salandin Accepted Answer Pending Moderation
  1. Thursday, 20 July 2023 04:05 AM UTC
  2. PowerBuilder
  3. # 2

Hi, Roland!

Yes, they are 451 bytes

 

Best regards

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2023 17:02 PM UTC
  2. PowerBuilder
  3. # 3

Do you have any idea how large the returned data would be if it had worked?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2023 13:57 PM UTC
  2. PowerBuilder
  3. # 4

Hi Pero;

  I would suggest that you open a Support Ticket for this issue.

  Then we can have Engineering look up the +3 RC in the PB runtime C++ source code to see what that RC really means.

Regards ... Chris

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.