Package org.apache.sling.servlethelpers.internalrequests

# Class SlingInternalRequest

java.lang.Object
org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest
org.apache.sling.servlethelpers.internalrequests.InternalRequest
org.apache.sling.servlethelpers.internalrequests.SlingInternalRequest

@Deprecated(since="2.0.0") public class SlingInternalRequest extends InternalRequest
Deprecated.
Use `JakartaInternalRequest` instead.
Internal request that uses a SlingRequestProcessor. This executes the complete Sling request processing pipeline. That's the same processing than Sling uses for HTTP requests, but it's not as efficient as the `ServletInternalRequest` which resolves and calls a Servlet or Script directly. This variant of internal requests is useful when no Resource is available, as it builds its own Resource based on the supplied parameters to drive the Servlet/Script resolution mechanism.

## Field Summary

### Fields inherited from class org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest

`bodyReader, contentType, DEFAULT_METHOD, explicitStatusCheck, extension, log, MDC_KEY, parameters, path, requestMethod, resourceResolver, selectorString`

## Constructor Summary

Constructors
Constructor
Description
`SlingInternalRequest(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull org.apache.sling.engine.SlingRequestProcessor p, @NotNull String path)`
Deprecated.
Setup an internal request that uses a SlingRequestProcessor

## Method Summary

Modifier and Type
Method
Description
`protected void`
`delegateExecute(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver)`
Deprecated.
Execute the supplied Request
`protected org.apache.sling.api.resource.Resource`
`getExecutionResource()`
Deprecated.
Provide the Resource to use to execute the request
`String`
`toString()`
Deprecated.
Return essential request info, used to set the logging MDC
`SlingInternalRequest`
`withResourceSuperType(String resourceSuperType)`
Deprecated.
Sets the sling:resourceSuperType of the fake Resource used to resolve the Script or Servlet used for the internal request
`SlingInternalRequest`
`withResourceType(String resourceType)`
Deprecated.
Sets the sling:resourceType of the fake Resource used to resolve the Script or Servlet used for the internal request

### Methods inherited from class org.apache.sling.servlethelpers.internalrequests.InternalRequest

`assertRequestExecuted, checkResponseContentType, checkStatus, execute, getResponse, getResponseAsString, getStatus, withBody, withContentType, withExtension, withParameter, withParameters, withRequestMethod, withSelectors`

### Methods inherited from class org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest

`checkNotNull, checkNotNull`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SlingInternalRequest

public SlingInternalRequest(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull org.apache.sling.engine.SlingRequestProcessor p, @NotNull @NotNull String path)
Deprecated.
Setup an internal request that uses a SlingRequestProcessor

## Method Details

### toString

public String toString()
Deprecated.
Return essential request info, used to set the logging MDC

Overrides:
  `toString` in class `Object`

### withResourceSuperType

public SlingInternalRequest withResourceSuperType(String resourceSuperType)
Deprecated.
Sets the sling:resourceSuperType of the fake Resource used to resolve the Script or Servlet used for the internal request

### withResourceType

public SlingInternalRequest withResourceType(String resourceType)
Deprecated.
Sets the sling:resourceType of the fake Resource used to resolve the Script or Servlet used for the internal request

### delegateExecute

protected void delegateExecute(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver) throws javax.servlet.ServletException, IOException
Deprecated.
Description copied from class: `InternalRequest`
Execute the supplied Request

Specified by:
  `delegateExecute` in class `InternalRequest`
Throws:
  `javax.servlet.ServletException`
  `IOException`

### getExecutionResource

protected org.apache.sling.api.resource.Resource getExecutionResource()
Deprecated.
Description copied from class: `BaseInternalRequest`
Provide the Resource to use to execute the request

Specified by:
  `getExecutionResource` in class `BaseInternalRequest`