-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathserver-test.http
55 lines (40 loc) · 2.05 KB
/
server-test.http
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
@api = http://localhost:5000
###
# Connect to the printer via serial port (Windows)
POST {{api}}/connect HTTP/1.1
Content-Type: application/json
{
"transport": "serial",
"address": "COM11"
}
###
# Connect to the printer via Bluetooth serial (use Bluetooth Classic address, not BLE address)
POST {{api}}/connect HTTP/1.1
Content-Type: application/json
{
"transport": "bluetooth",
"address": "07:27:03:17:6E:82"
}
###
# Print image
# Available parameters: quantity, image (required), printTask, direction, labelType, density
# Image is PNG encoded with base64
POST {{api}}/print HTTP/1.1
Content-Type: application/json
{
"quantity": 1,
"direction": "top",
"image": "iVBORw0KGgoAAAANSUhEUgAAAVgAAADICAAAAACIFqZrAAAA1GlDQ1BpY2MAABiVdZBBCwFBHMXfauPioMhBig9gSyk5kuKyHBaFXNZYS3bXNLubfC/fRPkMDs7O3koOWv/pP+/1b34zvQG0lSf8UO8CfhCpodVbzBfLeu6OPLIoooyaLUI5mgym+FvPG7REr0Zy1/9zqaVvnFBQL+y2kCqiPtjmKZL0Woe+dJhafXqTvuB7sfiwyat5J5hNqBV2FS4UbJxRxxox9vAQwaAGzJfONd/cGEcygrskrUi42JFtcBojhEPdcu5weTgnf/SbXdrK/qbKtFov/qczRp9clewAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAIwSURBVHja7d3BTsJQEIZRx/D+rzxGpLRAoRpL/C+ebyGiLsxhHKQsbvWbntE7ArBgBfZpHY4fC8SOtYm1CkZdBdP86reVibUKwAosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgweoJHSJ+izvHXo18/o2JBbs19Vmnvb0MbIWdo5exY3vB8yJHi73KxMad+pgxsdtow01xPGxNN724f706avmzGY9B+iqY/8SXz/oVvgfyYevmTj/+CtifuHbfjO/F/SVthzhH79h5Z/aM2sfP6uy3+HbS7Ob/u9WLm9VnrsySYe/BnYyzX0yM+wIh/CD4Uf6PvRzZutoTJnanOt7V9ViwgxW/Y0e9hjjmxNbVLdh9XZNlR4RdXh2MlU2G7UdyHb598ye2Vr/QW/Bgt0b2dIW7PluTrAePwR82wnteK2Bf5PNL2+li4vw9E7s9suuL4C17GYTv2Mv3A3pdMfL6YU0PevBz7LfffA14n/z8K4ywY3v3H7QKxg0sWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACCxaswIIFK7BgwQosWLACm9/5dKTww99NrMA+tRr1bG0TC1Zgwf7fPgCwK0CxpUdwQgAAAABJRU5ErkJggg=="
}
###
# Disconect
POST {{api}}/disconnect HTTP/1.1
Content-Type: application/json
###
# Printer info
GET {{api}}/info HTTP/1.1
Content-Type: application/json
###
# Is connected
GET {{api}}/connected HTTP/1.1
Content-Type: application/json