Reputation: 16440
Can these be done without writing any server side code?
Would like to handle the API call to an external website myself with jQuery but if it requires ANY server side coding then I can't be bothered with JSONP would rather just make the call server-side and output a JSON variable in a <script="text/javascript></script>
tag.
Upvotes: 0
Views: 513
Reputation: 87073
<script>
$.getJSON("http://yourapiurl?jsoncallback=?", {data as object format if you want},
function(data) {
// do what u wish with response `data`
});
</script>
Upvotes: 1
Reputation: 78740
If the service supports jsonp then there is no server-side code required by you. That's the point of jsonp.
Upvotes: 1