Hi.
I need to create an API that will accept XML. How can I specify an XML body
in a request spec? I have tried:
data = (xml as a string)
post '/api/path', env: { 'RAW_POST_BODY' => data, 'Content-Type' =>
'text/xml' }
and then I can access the body as request.body.read but the values do not
appear in the params. Obviously, I could pass the parameters with 'params:
{ key: value, ... }' but I'd prefer to be able to test with samples of the
body as they are going to be sent.
Regards,
Joe
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/10d88f3c-eb7b-47f3-94f6-e6b5b14aff10n%40googlegroups.com.