Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <textarea id="data" rows="15" cols="80">
- {
- "completedProtocol": "Extract",
- "map": [
- {
- "sampleIDsIn": [{ "clarityId": "claritySample1", "espId": "ESP024254" }, { "clarityId": "claritySample1", "espId": "ESP024255" }, { "clarityId": "claritySample1", "espId": "ESP024256" }],
- "sampleIDsOut": ["claritySample3"],
- "files":["http://fileserver.net/path/to/datafile3"]
- },
- {
- "sampleIDsIn": [{ "clarityId": "claritySample1", "espId": "ESP024458" }, { "clarityId": "claritySample1", "espId": "ESP024459" }, { "clarityId": "claritySample1", "espId": "ESP024460" }],
- "sampleIDsOut": ["claritySample3"],
- "files":["http://fileserver.net/path/to/datafile3"]
- }
- ]
- }
- </textarea>
- <input type=button onclick="test()" value="Test"/>
- <pre id="output"></pre>
- <script>
- function test() {
- try {
- var raw = $("#data").val();
- $.ajax({
- method: "POST",
- contentType: "application/json",
- processData: false,
- url: "/api/apps/clarity/advance",
- data: raw,
- success: function(data,status, xhr) {
- debugger;
- $("#output").html(JSON.stringify(data,null,2));
- },
- error: function(xhr, options, error) {
- debugger;
- alert(error);
- }
- });
- } catch(e) {
- alert("error: " + e);
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement