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

Enhanced RESTClient object – PB Docs 2021 – PowerBuilder Library

Enhanced RESTClient object – PB Docs 2021

Enhanced RESTClient object

The following functions are added to the RESTClient
object:

  • Submit can not only send data from the application client
    to the RESTful web service but also get the response body from
    the RESTful web service.

    The data to be submitted may be from either a DataWindow,
    DataStore, DataWindowChild, or JSONPackage. You can specify one
    or multiple DataWindow buffers, and also the range in the
    DataWindow, from which to submit the data. The request supports
    OAuth 2.0 authorization.

  • SendDeleteRequest: Sends the HTTP DELETE request to the
    server and then gets the content of the server response.

    Previously only the HTTPClient object supports sending a
    request to the RESTful web service. Now you can directly send a
    request from the RESTClient object, and the request supports
    OAuth 2.0 authorization.

  • SendGetRequest: Sends the HTTP GET request to the server
    and then gets the content of the server response.

  • SendPatchRequest: Sends the HTTP PATCH request to the
    server and then gets the content of the server response.

  • SendPostRequest: Sends the HTTP POST request to the server
    and then gets the content of the server response.

  • SendPutRequest: Sends the HTTP PUT request to the server
    and then gets the content of the server response.

  • GetJWTToken: Gets the JWT token using the POST
    method.

  • SetJWTToken: Sets the JWT token string to the HTTP request
    header which will be sent to the server.

  • GetOAuthToken: Gets the OAuth 2.0 access token.

  • SetOAuthToken: Sets the OAuth 2.0 token string to the HTTP
    request header which will be sent to the server.

  • RetrieveOne: Retrieves one data row to the DataWindow,
    DataWindowChild, or DataStore from the RESTFul Web
    service.

The following functions for the RESTClient object are
modified:

  • Retrieve – Retrieves data to the DataWindow,
    DataWindowChild, or DataStore from the RESTFul Web
    service.

    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. You can use
    the SetRequestHeader function to set the Accept-Encoding header
    to allow only the gzip compression format.

  • SetRequestHeader – Supports to add a request header or
    add/replace the value in the existing request header if the
    header already exists.

For more details about these functions, refer to the section called “RESTClient object” in Objects and Controls.


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