I've run into an issue where when I run a constructed curl command the server response with a 204 (intended), but when I construct a Faraday object with the same configuration it fails with a 500 error - IIS
Missing required parameter
The curl command:
curl -v -i -H "Content-Type: application/xml" -H "HEADER1: VALUE" -H "HEADERSERVICENAME: VALUE" -X POST -d '<empty string>' HOST_GOES_HERE
My faraday code:
conn = Faraday.new <HOST_GOES_HERE>, :ssl => {:version => :SSLv3}
response = conn.post do |req|
req.headers['Content-Type'] = 'application/xml'
req.headers['HEADER1'] = "VALUE"
req.headers['HEADERSERVICENAME'] = "VALUE"
req.body = ''
end
The only thing I can think of is if curl is sending some additional header that's not set in the curl command.