GetHttpVersion – PB Docs 2022

GetHttpVersion

PowerScript function

Description

Gets the HTTP protocol version used in communication. This function
should be used only when the request is sent successfully, otherwise, the
protocol version returned is not the actual protocol version.

Applies to

HTTPClient, RestClient, TokenResponse, ResourceResponse
objects

Syntax

Argument

Description

objectname

The name of the object for which you want to get the HTTP
protocol version.

Return value

String.

Returns the version of the HTTP protocol currently in use.

“HTTP 1.1” — The protocol currently used is HTTP 1.1.

“HTTP 2.0” — The protocol currently used is HTTP 2.0.

Examples

This example gets the HTTP protocol version through an HTTPClient
object:

This example gets the HTTP protocol version through a RESTClient
object:

This example gets the HTTP protocol version through a TokenResponse
object:

This example gets the HTTP protocol version through a
ResourceResponse object:


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