Hi
I have been trying to do the same thing with TestCase
sub-classes, attempting to set the content type to application/xml
when calling $this->action(...)
in an effort to simulate POST requests from an external application which only handles XML data. Instead, I am getting the form-urlencoded
type instead.
Have you had any luck resolving this? Trying to find someone else with this issue has only turned up this post!
Thanks
R
Hi
I think I found it. It took a bit of digging around in the Symfony API, but I've had success with the following: ['CONTENT_TYPE' => 'application/xml']
for the $server
parameter. Line 370
sets the value of CONTENT_TYPE
to 'application/x-www-form-urlencoded'
if it has not been set.
Hope this helps, if you are still looking.
R
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community