THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
In the header value above notice that it should not be prefixed with ? and you can separate parameters as usual with the & char.
Response Code
You can get the http response code from the http component by getting the value from out message header with HttpProducer.HTTP_RESPONSE_CODE.
Code Block | ||||
---|---|---|---|---|
| ||||
Exchange exchange = template.send("http://www.google.com/search", new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader(HttpProducer.QUERY, constant("hl=en&q=activemq"));
}
});
Message out = exchange.getOut();
int responseCode = out.getHeader(HttpProducer.HTTP_RESPONSE_CODE, Integer.class);
|
Include Page | ||||
---|---|---|---|---|
|