I am having an issue with my curl request. I am getting (through a GET request) a JSON from a web server and it works really great in my web browser. However when I get it from curl (or my ruby code), some value of my JSON are empty (they were not in my browser). That makes me lose a lot of data which is not acceptable. Does anyone have an idea of what makes this happen ? I already tried to change the user agent (see below) and still it gives the same result.
curl "http://..../path/to/json"
or
curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" "http://..../path/to/json"
gives the same result.
EDIT : I tried copying curl request from Safari (see below) and it gives the same missing values. Chrome however display the same result as curl.
curl 'https://path/to/json' -XGET -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4'