jsfiddle ajax example

How to use jsfiddle with ajax requests

HTML

<div class='wrapper'>
    <p>JSON will be received in 3 seconds</p>
    <div id='post'></div>
</div>

JavaScript

$.ajax({
  type: "POST",
  url: 'https://api.zoopla.co.uk/api/v1/geo_autocomplete.js?search_type=listings&search_term=a&api_key=ankmg9wdeyhsz3w2rwgrf9cg',
  dataType: "json",
    data:{
        json: JSON.stringify({
            text: 'Response from server',
        }),
        delay: 3
    },
}).done(function(response) {
        show_response(response);
    });


show_response = function(obj, result) {
    $('#post').append(obj.text);
};