/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
private ClientResponse _apply(final ClientRequest request) { checkNotClosed(); final ClientResponse response = new ClientResponse(LOOPBACK_STATUS, request); // Headers. response.headers(HeaderUtils.asStringHeaders(request.getHeaders())); // Entity. if (request.hasEntity()) { response.setEntityStream(new ByteArrayInputStream(bufferEntity(request))); } return response; }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
/** * Get a multi-valued map representing outbound message headers with their values converted * to strings. * * @return multi-valued map of outbound message header names to their string-converted values. */ public MultivaluedMap<String, String> getStringHeaders() { return HeaderUtils.asStringHeaders(headers); }
private ClientResponse _apply(final ClientRequest request) { checkNotClosed(); final ClientResponse response = new ClientResponse(LOOPBACK_STATUS, request); // Headers. response.headers(HeaderUtils.asStringHeaders(request.getHeaders())); // Entity. if (request.hasEntity()) { response.setEntityStream(new ByteArrayInputStream(bufferEntity(request))); } return response; }
/** * {@inheritDoc} */ @Override public void aroundWriteTo(final WriterInterceptorContext writerInterceptorContext) throws IOException, WebApplicationException { final LoggingStream stream = (LoggingStream) writerInterceptorContext.getProperty(ENTITY_LOGGER_PROPERTY); writerInterceptorContext.proceed(); final Object requestId = Requests.getProperty(LOGGING_ID_PROPERTY); final long id = requestId != null ? (Long) requestId : _id.incrementAndGet(); StringBuilder b = (StringBuilder) writerInterceptorContext.getProperty(LOGGER_BUFFER_PROPERTY); if (b == null) { b = new StringBuilder(); writerInterceptorContext.setProperty(LOGGER_BUFFER_PROPERTY, b); } printPrefixedHeaders(b, id, RESPONSE_PREFIX, HeaderUtils.asStringHeaders(writerInterceptorContext.getHeaders())); if (stream != null) { log(stream.getStringBuilder(MessageUtils.getCharset(writerInterceptorContext.getMediaType()))); } else { log(b); } }