This topic has not yet been written. The content below is from the topic description.
The HttpClientInvoker will now put the return from HttpURLConnection getHeaderFields() method into the metadata map passed to the Client's invoke() method (if not null). This means that if the caller passes a non-null Map, it can then get the response headers. It is important to note that each response header field key in the metadata map is associated with a list of response header values, so to get a value, would need code similar to: Object response = remotingClient.invoke((Object) null, metadata); String allowValue = (String) ((List) metadata.get("Allow").get(0); Can reference org.jboss.test.remoting.transport.http.method.HTTPInvokerTestClient for an example of this. Note that when making a http request using the OPTIONS method type, the return from the Client's invoke() method will ALWAYS be null. Also, if the response code is 400, the response returned will be that of the error stream and not the standard input stream. So is important to check for the response code. Two values that will always be set within the metadata map passed to the Client's invoke() method (when not null), is the response code and response message from the server. These can be found using the keys: ResponseCode - Can use the constant value HTTPMetaDataConstants.RESPONSE_CODE, if don't want to use the actual string 'ResponseCode' as the key. IMPORTANT - The value returned for this key will be of type java.lang.Integer. ResponseCodeMessage - Can use the constant value from HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, if don't want to use the actual string 'ResponseCodeMessage' as the key. The value returned for this key will be of type java.lang.String. An example of getting the response code can be found within org.jboss.test.remoting.transport.http.method.HTTPInvokerTestClient.