GetResponseStatusCode
PowerScript function
Description
Gets the response status code.
Applies to
HTTPClient and RestClient objects
Syntax
|
1 |
objectname.GetResponseStatusCode ( ) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the HTTPClient or RestClient object for which |
Return value
Long.
Returns the response status code.
Examples
This example gets the response status:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Integer li_rc Long ll_StatusCode String ls_ContentType Blob lblb_blob HttpClient lnv_HttpClient lnv_HttpClient = Create HttpClient // Send request using GET method li_rc = lnv_HttpClient.SendRequest("GET", "https://demo.appeon.com/PB/webapi_client/employee/102") // Obtain the response message if li_rc = 1 then // Obtain the response status ll_StatusCode = lnv_HttpClient.GetResponseStatusCode() if ll_StatusCode = 200 then // Obtain headers ls_ContentType = lnv_HttpClient.GetResponseHeader("Content-Type") // Obtain the specified header // Obtain the response data lnv_HttpClient.GetResponseBody(lblb_blob) ... end if end if |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest