Package org.restsql.core

Examples of org.restsql.core.HttpRequestAttributes


    } else { // exception instanceof SqlResourceException
      status = Status.INTERNAL_SERVER_ERROR;
    }
    if (requestLogger == null) {
      requestLogger = Factory.getRequestLogger();
      final HttpRequestAttributes httpAttribs = getHttpRequestAttributes(httpRequest, requestBody,
          requestMediaType, requestMediaType);
      requestLogger.setHttpRequestAttributes(httpAttribs);
    }
    requestLogger.log(status.getStatusCode(), exception);
    return Response.status(status).entity(exception.getMessage()).type(MediaType.TEXT_PLAIN).build();
View Full Code Here


    // Determine the media types and create http attributes structure
    String requestMediaType = RequestUtil.getRequestMediaType(contentMediaType);
    String responseMediaType = RequestUtil
        .getResponseMediaType(params, requestMediaType, acceptMediaType);
    final HttpRequestAttributes httpAttributes = HttpRequestHelper.getHttpRequestAttributes(httpRequest,
        requestBody, requestMediaType, responseMediaType);

    // Create logger
    final RequestLogger requestLogger = Factory.getRequestLogger();
    requestLogger.setHttpRequestAttributes(httpAttributes);
View Full Code Here

TOP

Related Classes of org.restsql.core.HttpRequestAttributes

Copyright © 2018 www.massapicom. 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.