Sha256: 24c8586b54b0ccf77124968bbd7e16fb3b12152f86ba75b30b3940d814d003b0
Contents?: true
Size: 1003 Bytes
Versions: 3
Compression:
Stored size: 1003 Bytes
Contents
$ -> $('#send .loading').hide() $('#send').ajaxStart -> $(this).find('.loading').show() $(this).find('.default').hide() $('#send').ajaxStop -> $(this).find('.loading').hide() $(this).find('.default').show() $("#send").click -> return false if $(this).find('.loading').is(":visible") url = $("#url").val() body = $("#body").val() method = $("input[name='method']:checked").val() jsonBody = JSON.parse(body) if body $.ajax url: url, type: method, data: jsonBody, dataType: 'json', success: (data, status, req) -> $("#status-code").val req.status $("#response-body").val js_beautify req.responseText , error: (xhr, ajaxOptions, thrownError) -> $("#status-code").val xhr.status $("#response-body").val js_beautify xhr.responseText $('tr').click -> $('#url').val $(this).data('tester').url $('#'+ $(this).data('tester').method).attr('checked', true); $('#body').val js_beautify $(this).data('tester').body
Version data entries
3 entries across 3 versions & 1 rubygems