SetJWTToken – PB Docs 2019

SetJWTToken

PowerScript function

Description

Sets the JWT token string to the HTTP request header which will be
sent to the server in the following interface: Submit, SendGetRequest, SendPostRequest, SendDeleteRequest, SendPatchRequest, SendPutRequest, Retrieve, and RetrieveOne. If a token has been set in
the HTTP request header, it will replace the original token.

Applies to

RESTClient objects

Syntax

Argument

Description

objectname

The name of the RESTClient object in which you want to set
the JWT token.

jwtToken

A string value specifying the JWT token.

Return value

Integer. Returns 1 if the function 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

Example 1

The following code example sets the JWT token authentication.

Example 2

The following code example sets the JWT token authentication.

See also

GetJWTToken


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