views:

75

answers:

1

I need to send the following header with my httpRequest:

'X-ABC-Reco-Token'=>'a0d15977';

I have the following code:


            $array = array("X-ABC-Reco-Token"=>$token);
            $this->request->setHeaders($array);
            echo var_dump($this->request->getHeaders());

however, this is the output I get:

 "X-Abc-Reco-Token"=>string 'a0d15977' 

Note that PHP converted X-ABC to X-Abc.

Is there a way I can force the header to be the case I want?

+1  A: 

In worst case, you can make own class and inherit from httpRequest, then overload setHeaders function and make it work as you want. But you will need source code of that class to do this.

Other method in my mind is inherit from httpRequest and add a method like "fix()", which would set property of class where http request is waiting (maybe "queryData" ? - see http://www.php.net/manual/pl/class.httprequest.php) in your way by str_replace() Abc to ABC.

killer_PL