Page Contents
Home > @loopback/rest > RestHttpErrors > unsupportedMediaType
RestHttpErrors.unsupportedMediaType() function
Signature:
function unsupportedMediaType(contentType: string, allowedTypes?: string[]): HttpErrors.HttpError & {
code: string;
contentType: string;
allowedMediaTypes: string[];
};
Parameters
Parameter | Type | Description |
---|---|---|
contentType | string | |
allowedTypes | string[] |
Returns:
HttpErrors.HttpError & { code: string; contentType: string; allowedMediaTypes: string[]; }