Package | Description |
---|---|
org.apache.sling.servlethelpers.internalrequests |
Helpers for internal Sling requests
|
Modifier and Type | Class and Description |
---|---|
class |
ServletInternalRequest
Internal request that a Servlet or Script directly,
after resolving it using a ServletResolver.
|
class |
SlingInternalRequest
Internal request that uses a SlingRequestProcessor.
|
Modifier and Type | Method and Description |
---|---|
InternalRequest |
InternalRequest.checkResponseContentType(java.lang.String contentType)
After executing the request, checks that the response content-type
is as expected.
|
InternalRequest |
InternalRequest.checkStatus(int... acceptableValues)
After executing the request, checks that the request status is one
of the supplied values.
|
InternalRequest |
InternalRequest.execute()
Execute the internal request.
|
InternalRequest |
InternalRequest.withBody(java.io.Reader bodyContent)
Use the supplied Reader as the request's body content
|
InternalRequest |
InternalRequest.withContentType(java.lang.String contentType)
Set the HTTP request's Content-Type
|
InternalRequest |
InternalRequest.withExtension(java.lang.String extension)
Sets the optional extension of the internal request, which influence
the Servlet/Script resolution.
|
InternalRequest |
InternalRequest.withParameter(java.lang.String key,
java.lang.Object value)
Set a request parameter
|
InternalRequest |
InternalRequest.withParameters(java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Add the supplied request parameters to the current ones
|
InternalRequest |
InternalRequest.withRequestMethod(java.lang.String method)
Set the HTTP request method to use - defaults to GET
|
InternalRequest |
InternalRequest.withSelectors(java.lang.String... selectors)
Sets the optional selectors of the internal request, which influence
the Servlet/Script resolution.
|
Copyright © 2014–2021 wcm.io. All rights reserved.