* mappings of the corresponding input message (if any).
*
* @param message the message to be sent.
*/
public void send(Message message) throws IOException {
HttpResponse response = request.get(HttpResponse.class);
// handle response headers
updateResponseHeaders(message);
Map<String, List<String>> protocolHeaders = getProtocolHeaders(message);
// set headers of the HTTP response object
for (Map.Entry<String, List<String>> entry : protocolHeaders.entrySet()) {
String headerName = entry.getKey();
String headerValue = getHeaderValue(entry.getValue());
response.setHeader(headerName, headerValue);
}
message.setContent(OutputStream.class, new WrappedOutputStream(message, response));
}