In rails server, when a request has no ACCEPT field in the HEADER, it will regard it as html format (ref)
Since we are going to load the xml from remote, it would be better if we can setup the correct headers for server to determine which format should be responded.
In rails server, when a request has no
ACCEPT
field in the HEADER, it will regard it as html format (ref)Since we are going to load the
xml
from remote, it would be better if we can setup the correct headers for server to determine which format should be responded.Related code
https://github.com/savonrb/wasabi/blob/b2abe7812afe4721fd54aa1277f517f1a6334a03/lib/wasabi/resolver.rb#L43-L50
Possible code to setup the header