Sha256: f4664102bfe54b871cf749610e6c5aeb481f5846f9c5bf3ce382c580eddc8163
Contents?: true
Size: 1.31 KB
Versions: 42
Compression:
Stored size: 1.31 KB
Contents
(function(){ "use strict"; $(function(){ // At tutorial chapter1, sending request to fluentd if($('#chapter1').length === 0) return; new Vue({ el: "#chapter1", data: { "payloads": [ { "path": "/debug.foo", "data" : { "message": "test message", // NOTE: "'" will break curl command } }, { "path": "/debug.bar", "data" : { "my_number": 42, "my_array": [1, 2, 3] } }, { "path": "/xxxxx", "data" : { "xx": "will be unmatched" } }, { "path": "/slash/convert/to/dot", "data" : { "greeting": "hello" } } ] }, methods: { sendRequest: function(payload){ new Promise(function(resolve, reject) { $.ajax({ url: "/tutorials/request_fluentd", data: JSON.stringify(payload), contentType: "application/json", dataType: "json", type: "POST" }).done(resolve).fail(reject); })["catch"](function(e){ console.error(e); }); } } }); }); })();
Version data entries
42 entries across 42 versions & 1 rubygems