pdk.flow.HttpRequest
Contains functions that can be applied to HttpRequest structures
All functions
getHeader
Gets a header by name. If the request contains multiple headers with the same name, only the first will be returned.
Arguments:
request :: pdk.net.http.Request
headerName :: pdk.core.String
Result:
output :: pdk.net.http.Header - header or
NULL
if it doesn't exist
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
getHeaderValue
Gets the value of a header by name. If the request contains multiple headers with the same name, only the first value will be returned.
Arguments:
request :: pdk.net.http.Request
headerName :: pdk.core.String
Result:
output :: pdk.core.String - Header value as String or
NULL
if it doesn't exist
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
getHeaderValues
Get header values by name. Use this function in case of multiple headers with the same name.
Arguments:
request :: pdk.net.http.Request
headerName :: pdk.core.String
Result:
output :: pdk.core.Array<pdk.core.String> - Header values in String format , or
NULL
if the header doesn't exist.
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
isHeaderExists
Determines whether the header exists in the request.
Arguments:
request :: pdk.net.http.Request
headerName :: pdk.core.String
Result:
output :: pdk.core.Boolean -
true
if the header exists
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
getCookie
Gets a cookie by name.
Arguments:
request :: pdk.net.http.Request
cookieName :: pdk.core.String
Result:
output :: pdk.net.http.Cookie - cookie or
NULL
if it doesn't exist
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
isCookieExists
Determines whether the cookie exists in the request.
Arguments:
request :: pdk.net.http.Request
cookieName :: pdk.core.String
Result:
output :: pdk.core.Boolean -
true
if the cookie exists
Possible exceptions
NullPointerException - throws an error if at least one argument is
NULL
Last updated