Hi team,

I have been using cakephp for one of my projects and we are trying to
test with Simpletest as provided in the documentation. However, our
api cannot be called directly. We have to use

    * Method: POST
    * Header Name: Content-Type
    * Header Value: application/x-www-form-urlencoded
    * Body: params={"username":"aung","password":"pass"}

I can solve the first problem by using 'method'=>post in testAction()
method from CakeTestCase as in 
http://book.cakephp.org/view/366/Testing-controllers
page. However, i don't have any idea how to set the header name, type
and params into the body. We can use httpclient to do these things but
httpclient is a bit manual and we think simpletest in cakephp
framework is better if we can solve this problem.

If anyone knows, please let me know the solution :) ..

Thank very much in advance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to