I have been playing around with the jQuery library the last week or two.
Very handy! I am now playing with the AJAX requests to retrieve things such as the weather, current downloads and more, which have been going well so far!
I have now tried to connect up to my ISP to get my current data usage (peak, off peak etc).
When I use Chrome, I can manually type the variables into the URL and have the required JSON code show in the browser. The issue is, that it seems to return text/html
instead of application/json
.
When you go into developer tools, it shows text/html
. This make it difficult for me to retrieve the data from my home server using AJAX and JSONP
. See here for a failed query (but you can still see the text/html
output, which is in a JSON format!
Failed JSON Query on ISP
My question is, how could I get this data from the server URL, then make it into JSON that jQuery can read?
When I try the .load
, $.get
functions I run into Cross Origin Issues...
EDIT:Here is the PDF documentation for the API (Download at the bottom of the page) Notice that I need to append certain values (user / pass / token). My ultimate aim is to have my JS read these values and store them.