You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Rails 4.2.1, I added
config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
to my Application in application.rb
But my XML post still isn't getting parsed. I put debugger lines in the initializers for XmlParamsParser and for the core ParamsParser. Both initializers are called (probably from the line I added) but neither one's "call" is ever called. And of course, by XML body isn't being parsed, either, as far as I can tell. Do I have to do this manually, instead? Hash.from_xml ?
First Rails 4.2.1 project, and first time with rails-api, so most likely I'm doing it wrong....
TIA
The text was updated successfully, but these errors were encountered:
Ah. Problem mostly solved. Looks like it's working when Rails is fully running. I was trying to see the XML in a post get parsed when in an spec unit test. Something seems to be skipping the params parser and xml parser. Maybe for speed? Anyone know if it can be enabled, so I'm testing original API input ? From a unit test perspective, I don't mind shifting my post to use a hash. It was just confusing.
In Rails 4.2.1, I added
config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
to my Application in application.rb
But my XML post still isn't getting parsed. I put debugger lines in the initializers for XmlParamsParser and for the core ParamsParser. Both initializers are called (probably from the line I added) but neither one's "call" is ever called. And of course, by XML body isn't being parsed, either, as far as I can tell. Do I have to do this manually, instead? Hash.from_xml ?
First Rails 4.2.1 project, and first time with rails-api, so most likely I'm doing it wrong....
TIA
The text was updated successfully, but these errors were encountered: