Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetResponseBody – PB Docs 2018 – PowerBuilder Library

GetResponseBody – PB Docs 2018

GetResponseBody

PowerScript function

Description

Gets the response body into a string or blob value.

Applies to

HTTPClient and RESTClient objects

Syntax

Argument

Description

objectname

The name of the HTTPClient or RESTClient object for
which you want to get the response body.

data

A string or blob variable into which the function
returns the data. The string data will be received and converted
with EncodingUTF16LE!.

(For RESTClient object) If the
data received from the RESTful web service is compressed as gzip,
it will be automatically decompressed. Only gzip compression
format is supported at this moment.

encodingType

A value specifying the encoding type of the string
data to be sent: EncodingANSI!, EncodingUTF8!, EncodingUTF16LE!,
or EncodingUTF16BE!.

Return value

Integer.

Returns 1 if it succeeds and a negative value if an error occurs. If
any argument’s value is null, the method returns null.

1 — Success

-1 — General error

-7 — Failed to decompress the response body.

Example 1

This example gets the response body and converts to a blob
value:

Example 2

This example gets data and shows it in the DataWindow:

Example 3

The client sends the server a request which includes the “gzip”
compression method; then the server compresses and returns the data as
requested; and then the client automatically extracts the data.

See also

GetResponseHeader

GetResponseHeaders

GetResponseStatusCode

GetResponseStatusText


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x