Represents a request in Commerce Cloud Digital. Each pipeline dictionary contains a CurrentRequest object, which is of
type dw.system.Request. Most requests are HTTP requests, so you can use this object to get information about the HTTP
request, such as the HTTP headers. You can also get a list of cookies, if any, associated with the request. If the
request is issued from a job, the request is not an HTTP request, so HTTP-related methods return null.
Returns the SCAPI path pattern in the following way:
The first three segments /api-family/api-name/versionwith concrete values.
The /organizations part with the path parameter name organizationIdin curly brackets.
The actual resource path additional path parameter names in curly brackets.
Returns null if isSCAPI() returns false i.e. if the request is not a SCAPI request.
For example, in the context of a request to get a single product from shopper-products API, this method would
return /product/shopper-products/v1/organizations/{organizationId}/products/{id}
Returns the client id of the current SCAPI or OCAPI request. If the request is not a SCAPI request or not an
OCAPI request 'null' is returned. For client ids owned by Commerce Cloud Digital an alias is returned.
Returns the physical location for the current request, if available. The
location is calculated based on the IP address of the request. Note, if
the geolocation tracking feature is not enabled, this method always
returns null.
Returns the Cookies object, which can be used to read cookies sent by the client. Use the method
Response.addHttpCookie() to add a cookie to the outgoing response.
Returns a Map containing the raw HTTP parameters sent to the server. The Map contains name/value pairs. Each name
is a String and each value is a String array.
Returns the HTTP protocol used for this request. Possible values are "http" or "https". If the current activity
is not related to an HTTP request, for example, when the request is part of a job, this method returns null.
Returns whether the HTTP communication is secure, which basically means that the communication happens via https.
If the current activity is not related to an HTTP request the method returns false.
Returns the locale of the current request. This locale is set by the system based on the information in the URL.
It may be different from the locale returned by getHttpLocale(), which is the preferred locale sent by the user agent.
Returns the unique identifier of the current request. The unique id is helpful for debugging purpose, e.g. relate
debug messages to a particular request.
Adds the specified cookie to the outgoing response. This method can be called multiple times to set more than one
cookie. If a cookie with the same cookie name, domain and path is set multiple times for the same response, only
the last set cookie with this name is send to the client. This method can be used to set, update or delete
cookies at the client. If the cookie doesn't exist at the client, it is set initially. If a cookie with the same
name, domain and path already exists at the client, it is updated. A cookie can be deleted at the client by
submitting a cookie with the maxAge attribute set to 0 (see Cookie.setMaxAge() for more information).
1_Example, how a cookie can be deleted at the client:_23var cookie : Cookie = new Cookie("SomeName", "Simple Value");45cookie.setMaxAge(0);67request.addHttpCookie(cookie);
Returns the client id of the current SCAPI or OCAPI request. If the request is not a SCAPI request or not an
OCAPI request 'null' is returned. For client ids owned by Commerce Cloud Digital an alias is returned.
Returns:
a client id or alias in case of an OCAPI request, otherwise null.
Returns the physical location for the current request, if available. The
location is calculated based on the IP address of the request. Note, if
the geolocation tracking feature is not enabled, this method always
returns null.
Returns:
The geolocation of the current request, or null if this is not
available.
Returns the Cookies object, which can be used to read cookies sent by the client. Use the method
Response.addHttpCookie() to add a cookie to the outgoing response.
Returns:
Cookies object or null if this is not an HTTP request
Returns a Map containing the raw HTTP parameters sent to the server. The Map contains name/value pairs. Each name
is a String and each value is a String array.
Returns:
a Map containing all the raw HTTP parameters send to the server.
Returns the HTTP protocol used for this request. Possible values are "http" or "https". If the current activity
is not related to an HTTP request, for example, when the request is part of a job, this method returns null.
Returns the locale of the current request. This locale is set by the system based on the information in the URL.
It may be different from the locale returned by getHttpLocale(), which is the preferred locale sent by the user agent.
Returns the unique identifier of the current request. The unique id is helpful for debugging purpose, e.g. relate
debug messages to a particular request.
Returns the SCAPI path pattern in the following way:
The first three segments /api-family/api-name/versionwith concrete values.
The /organizations part with the path parameter name organizationIdin curly brackets.
The actual resource path additional path parameter names in curly brackets.
Returns null if isSCAPI() returns false i.e. if the request is not a SCAPI request.
For example, in the context of a request to get a single product from shopper-products API, this method would
return /product/shopper-products/v1/organizations/{organizationId}/products/{id}
Returns whether the HTTP communication is secure, which basically means that the communication happens via https.
If the current activity is not related to an HTTP request the method returns false.
Sets the physical location for the current request and remembers the new
value for the duration of the user session. So any subsequent calls to
getGeolocation() will return this value