Javascript/jQuery/Ajax interface to HTTP GET api -
I am trying to find the simplest way to interface a HTTP GET API: I was able to pass in a zip Want to get code and get results json / xml / csv
I copied this code () but I think I am trying to reach an external server. However, this website () is capable of joining the API successfully and returning the values, so it should be possible!
I have no experience of jQuery / Ajax / other (?) As much help / code as possible will be appreciated!
short answer: with the current circumstances, it is impossible
explanation :
About the request
You can send with cross-origin requests, but the server should handle this type of operation. Your server does not work with it, because response verification fails (consider sampling):
var option = {apiKey: 'j6M7YeDBfIo2QC3wBkS9zwJt63Q0DzKWGw3ELHg0pE3gh6MSqE10bKuhOkirU2oB', format: 'json', zip1 : '64052', Zip2: '52242', Units: 'km'}; $ Ajax ({url: 'http://zipcodedistanceapi.redline13.com/rest/'+options.apiKey+'/distance.'+options.format+''''options.zip1+'/'+options.zip2+'/' + Options.units, datatype: 'jsonp', success: function (feedback data) {warning (response data);},});
About web-sniffer.net
This works with server-side support, for example, request from your server:
Request URL: http: //web-sniffer.net/ Request Method: Post Forms Data: URL: http: //zipcodedistanceapi.redline13.com/? Rest / j6M7YeDBfIo2QC3wBkS9zwJt63Q0DzKWGw3ELHg0pE3gh6MSqE10bKuhOkirU2oB / distance.json/64128/63401 / kmjsonp = jQuery111196138642730146370549383006431216814089566_1392673427348 & amp; _ = 1392673427349 is presented: http submit: 1.1 gzip: yes type: uak received: 0
Comments
Post a Comment