-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (79 loc) · 2.64 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!-- index.html -->
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script>
function testAPI()
{
var parameter = {
"Board": {
"Main": {
"Number": "889900",
"Workshop": {"Name": "EXASUD"}
},
"Sub": [
{
"Number": "889902",
"Workshop": {"Name": "EXAVERNIS"}
}, {
"Number": "889903",
"Workshop": {"Name": "SOLANDEC"}
}
],
"ProductionActivity": "OFFSET",
"Price": "3.5",
"NbOrder": "3",
"Title": "417 - 350 CM - QRV",
"DateCreation": "2015-12-21",
"DateShippingWithoutFinish": "2015-12-25",
"DateShippingWithFinish": "",
"PrintMethod": "RV",
"CommentBoard": "ATTENTION",
"Media": {
"Kind": "350 CM",
"Size": "32x47",
"Quantity": "417"
},
"Operator": {
"Name": "Moi",
"SurName": "Toi",
"Mail": ""
},
"Spec": [
{
"Name": "color",
"Front": "QR",
"Back": "QV"
}, {
"Name": "laminating",
"Front": "LGF",
"Back": ""
}
]
},
"Orders":"test"
};
$('#param').text(JSON.stringify(parameter));
var url = 'https://6pl7cdhk2j.execute-api.us-west-2.amazonaws.com/tests/xmlcreator';
jQuery.ajax({
dataType : "json",
url : url,
type : "post",
data: JSON.stringify(parameter),
success: function (data) {
console.log(data);
$('#maDiv').text(data);
}
});
}
</script>
</head>
<body>
<button onclick="testAPI()">Launch jSon</button>
<br/><br/><a href="index.html"><button>Refresh</button></a>
<h3>PARAMS</h3>
<code><span id="param"></span></code>
<h3>XML</h3>
<pre><span id="maDiv"></span></pre>
</body>
</html>