1. Samuel Sanchez Avila
  2. PowerBuilder
  3. Tuesday, 13 April 2021 22:30 PM UTC

Hello.

I have been using HttpClient. but now im having problems with this object in GetResponseBody.

Webservice response is a PDF in base64 string, it works fine with 9MB or lower. But for bigger ones, GetResponseBody don´t catch the response string. 

The Post webservices can return PDF in base64 string up to 400 MB aprox. Is there a way to get that largeeeee base64 string from the webservice in PB?

 

POWER BUILDER HELPS MENTION:

GetResponseBodyPowerScript function
Description

Gets the response body into a string or blob value.

It is not recommended to use this method to process large data (20 MB or 100,000 data rows can be considered as large data based on our tests).

 

What can i use instead?

Thanks you so much

Accepted Answer
Daryl Foster Accepted Answer Pending Moderation
  1. Wednesday, 14 April 2021 01:44 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Samuel, I haven't used it myself, but there is also a ReadData method on HttpClient. I think that would be the way to go.  There is a good example on https://docs.appeon.com/pb2019r3/powerscript_reference/ch02s04s611.html

HttpClient also has an AutoReadData property.  It looks like you will need to set that to false if you want to use the ReadData method.  That is also shown in the example above.

 

Comment
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 April 2021 03:07 AM UTC
  2. PowerBuilder
  3. # 1

Hi Samuel,

 

Daryl is right, if you want to process large data using HTTPClient, it is recommended that you disable the AutoReadData property (by default it is enabled) and use the ReadData function. See a code example in ReadData for how to process large data.

We will update the local PowerBuilder Help as below in the new release.

https://docs.appeon.com/pb2019r3/objects_and_controls/ch02s41.html

https://docs.appeon.com/pb2019r3/powerscript_reference/ch02s04s611.html 

 

Regards,

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.