javascript - How to handle Content-Description:File Transfer in AngularJS $http response -


short version: $http request works fine on desktop, fails on mobile

within angular controller, have $http call resource returns following response headers:

access-control-allow-origin:* cache-control:must-revalidate, post-check=0, pre-check=0 connection:keep-alive content-description:file transfer content-disposition:attachment; filename=verses.json content-length:1392 content-transfer-encoding:binary content-type:application/octet-stream date:sun, 16 aug 2015 23:13:18 gmt expires:0 keep-alive:timeout=5, max=100 pragma:public server:apache/2.4.6 (centos) openssl/1.0.1e-fips php/5.4.16 x-powered-by:php/5.4.16 

as can see in jsfiddle, response recognized json.

however, if load same jsfiddle on mobile device nothing returns. i've looked $http's transformresponse, documentation pretty sparse , can't find example of trying i'm getting. there examples of turning json response downloadable file, i'm looking opposite.

i know obvious solution ask api return application/json instead of application/octet-stream, until happens, i'd appreciate or pointing me in right direction. thanks!


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -