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(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(Reader bodyContent)
Use the supplied Reader as the request's body content
|
InternalRequest |
InternalRequest.withContentType(String contentType)
Set the HTTP request's Content-Type
|
InternalRequest |
InternalRequest.withExtension(String extension)
Sets the optional extension of the internal request, which influence
the Servlet/Script resolution.
|
InternalRequest |
InternalRequest.withParameter(String key,
Object value)
Set a request parameter
|
InternalRequest |
InternalRequest.withParameters(Map<String,Object> additionalParameters)
Add the supplied request parameters to the current ones
|
InternalRequest |
InternalRequest.withRequestMethod(String method)
Set the HTTP request method to use - defaults to GET
|
InternalRequest |
InternalRequest.withSelectors(String... selectors)
Sets the optional selectors of the internal request, which influence
the Servlet/Script resolution.
|
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.