Methods
getMimeInfo(resourcePath) → {module:@ui5/server.middleware.MiddlewareUtil.MimeInfo}
Returns MIME information derived from a given resource path.
This method is only available to custom middleware extensions defining
Specification Version 2.0 and above.
Parameters:
Name | Type | Description |
---|---|---|
resourcePath |
object |
Returns:
getPathname(req) → {string}
Returns the pathname
of a given request. Any escape sequences will be decoded.
This method is only available to custom middleware extensions defining
Specification Version 2.0 and above.
Parameters:
Name | Type | Description |
---|---|---|
req |
object | Request object |
Returns:
Pathname
of the given request
- Type
- string
Type Definitions
MimeInfo
Properties:
Name | Type | Description |
---|---|---|
type |
string | Detected content-type for the given resource path |
charset |
string | Default charset for the detected content-type |
contentType |
string | Calculated content-type header value |
MIME Info
Type:
- object
Example
const mimeInfo = {
"type": "text/html",
"charset": "utf-8",
"contentType": "text/html; charset=utf-8"
};