JSFiddle - React, Tailwind, and code Playground

by harshavarma

HTML

<button id="click">Get Listings</button>
<div id="result"></div>

JavaScript

var Sandbox = {
    listingsUrl: "http://fox-service/api.internal.brightfox.com.2/ListingServiceReference.svc/METR/Agents/[email protected]/cheesman/Listings/Projects/4?Bedrooms=0&PriceRangeBottom=0&PriceRangeTop=0&SalesStatus=1&Nodes=&Start=0&Offset=0"
    };

$('#click').click(function() {
    $.ajax({
        type: 'GET',
        dataType: 'JSON',
        url: Sandbox.listingsUrl,
        success: function(data) {
            $('#result').text(data);
        },
        error: function(jqXHR, textStatus, errorThrown) {
           alert(textStatus);
           alert(errorThrown);
        }
    });
});