savonrb / wasabi

A simple WSDL parser
MIT License
90 stars 84 forks source link

should send request with ACCEPT headers when load xml from remote #115

Open khiav223577 opened 1 year ago

khiav223577 commented 1 year ago

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

request.headers['ACCEPT'] = 'application/xml'