*
- * The Http Responses are considerate as Resources, the Http header "Accept-Ranges: bytes" is injected and allow you to use
- * the Http header 'Range:bytes=1-100' in the request and grabbed only range of Bytes desired.
- * And the Http Responses didn't come back with a HttpHeader "Transfer-Encoding: chunked" cause the header Content-Length.
+ * The Http Responses can be considerate as Resources, the Http header "Accept-Ranges: bytes" is injected and allow you to use
+ * the Http header 'Range:bytes=-1000' in the request and by example grabbed the last 1000 bytes (or a range of Bytes).
+ * And the Http Responses will come back without a "Transfer-Encoding: chunked" HttpHeader cause now the header Content-Length.
*
* For configure all the Responses in Resource put eh Method empty and use the path pattern=/api/**
* nexus.backend.api-backend-resource.matchers.matchers1.method=
@@ -121,23 +123,27 @@ public final void setBackendService(BackendService backendService, ResourceMatch
}
/**
- * Prepare matchers Methods and Ant paths pattern dedicated only for the Resources (see settings.properties)
- */
+ * Prepare matchers Methods and Ant paths pattern dedicated only for the Resources
+ */
@PostConstruct
private void postConstruct() {
List
- * Or a MultipartRequest encapsulated a List of BackendResource Json Entity Object and a Request Map parameters
- * And return a Response Entity Object or a ByteArray Resource file or any others content in ByteArray...
+ * Or a MultipartRequest encapsulated a List of BackendResource and a Request Map parameters, and form Json Entity Object
+ * And return a ResponseEntity Json Entity Object or a ByteArray Resource file or any others content in ByteArray...
+ *
+ * For a @RequestMapping allow headers is set to GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
*
* @param body String representing the RequestBody Object, just transfer the RequestBody
* @param method HttpMethod GET, POST, PUT, PATCH or DELETE
* @param request The current HttpServletRequest
+ * @param nativeWebRequest The current NativeWebRequest for get the MultipartRequest
* @return Object Return a ResponseEntity Object or a ByteArray Resource
* @throws NexusHttpException Exception when a http request to the backend fails
* @throws NexusIllegalUrlException Exception when an illegal url will be requested
*/
- @RequestMapping(value = "/**", produces = MediaType.APPLICATION_JSON_VALUE)
- public final Object requestEntity(@RequestBody(required = false) String body, HttpMethod method, HttpServletRequest request)
+ @RequestMapping(value = "/**")
+ public final Object requestEntity(@RequestBody(required = false) String body, HttpMethod method,
+ HttpServletRequest request, HttpServletResponse response, NativeWebRequest nativeWebRequest)
throws NexusHttpException, NexusIllegalUrlException {
// MultiValueMap store the MultiPartFiles and the Parameters Map
MultiValueMap