i'm trying financial data yahoo finance using java / spring resttemplate. suppose need data ibm, link this: https://query1.finance.yahoo.com/v10/finance/quotesummary/ibm?formatted=true&modules=incomestatementhistory%2ccashflowstatementhistory%2cbalancesheethistory%2cincomestatementhistoryquarterly%2ccashflowstatementhistoryquarterly%2cbalancesheethistoryquarterly%2cearnings nice formatted json data need:
{ "quotesummary": { "result": [ { "cashflowstatementhistoryquarterly": { "cashflowstatements": [ { "maxage": 1, "enddate": { "raw": 1459382400, "fmt": "2016-03-31" }, "netincome": { "raw": -5490000, "fmt": "-5.49m", "longfmt": "-5,490,000" }, "depreciation": { "raw": 16849000, "fmt": "16.85m", ... etc
but when try open same link using resttemplate: using code like:
resttemplate resttemplate = new resttemplate(); responseentity<string>response = resttemplate.getforentity(url, string.class);
the result i'm getting in response different, looks this:
<200 ok,{"quotesummary":{"result":[{}],"error":null}},{x-yql-host=[pprd3-node7511-lh2.manhattan.ir2.yahoo.com], x-content-type-options=[nosniff], x-yahoo-request-id=[6s0s3nlbqhlls], cache-control=[max-age=1, stale-while-revalidate=15], content-type=[application/json; charset=utf-8], vary=[origin], content-length=[45], date=[mon, 08 aug 2016 19:00:12 gmt], age=[2], server=[ats], via=[http/1.1 media-ncache-api14.prod.media.ir2.yahoo.com (apachetrafficserver [cmssfw]), http/1.1 media-ncache-api15.prod.media.ir2.yahoo.com (apachetrafficserver [cmssf ]), http/1.1 media-router-api3.prod.media.ir2.yahoo.com (apachetrafficserver [cmssfw]), https/1.1 r07.ycpi.loa.yahoo.net (apachetrafficserver [cmssfw])], strict-transport-security=[max-age=0], connection=[keep-alive], y-trace=[baeaqaaaaacpmecqtriz3qaaaaaaaaaaoehjlsk9d9kaaaaaaaaaaaafozqgmka_aau5laap7riuohdnaaaaaa--]}>
any idea how can same result i'm getting in browser?
thank you
Comments
Post a Comment