I am trying to get the following curl command (which works) replicated in some Ruby code, however the 'Customer-Id' header part seems to not get sent/picked up by the API.
The curl command is:
curl -u ‘me@mydomain.com’ -H ‘Customer-Id: 243’ https://192.168.50.50/api/customers
which returns info on that customer. However in Ruby, the following is not working:
auth = {
username: “me@mydomain.com”,
password: "#{pass}"
}
@result = HTTParty.get("https://192.168.50.50/api/customers",:basic_auth => auth, :headers => { ‘Customer-Id: 243’ } ).parsed_response
puts @result
If anyone has any ideas what I am doing wrong here, it would be appreciated!