Examples of IMediaType


Examples of com.ramforth.webserver.http.IMediaType

    private IHttpRequestBodyParser buildEmpty(TransferEncodingHttpHeader transferEncoding) {
        return new EmptyHttpRequestBodyParser();
    }

    private IHttpRequestBodyParser buildFromContentType(ContentTypeHttpHeader contentType, TransferEncodingHttpHeader transferEncoding) {
        IMediaType mediaType = contentType.getMediaType();
        String mimeTypeString = mediaType.getType();
        String loweredMimeTypeString = mimeTypeString.toLowerCase();

        IHttpRequestBodyParser bodyParser = bodyParsers.get(loweredMimeTypeString);
        if (bodyParser == null) {
            LOGGER.warn("Unsupported media type. Trying application/octet-stream.", new HttpException(HttpStatusCode.STATUS_415_UNSUPPORTED_MEDIA_TYPE, "The media type '" + mimeTypeString + "' is not (yet) supported."));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.