package com.yihu.hos.camel.qlc.processor;

import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.http.common.HttpMessage;

/**
 * Created by Zdm on 2016/7/13.
 */
public class Processor0 implements Processor {
    public void process(Exchange exchange) throws Exception {
        Message outMessage = exchange.getOut();
        HttpMessage inMessage = (HttpMessage) exchange.getIn();
        String queryString = "api=qlc&param="+inMessage.getRequest().getParameterValues("data")[0];
        outMessage.setHeader(Exchange.HTTP_QUERY, queryString);
    }

}
