CE318-T Photometer
User Operation Manual
Revision V4.10 October 2021
35
• PATH: /path1/path2
• PORT: 2020 (If the port is not present in the URL, set 80 for HTTP and 443 for
HTTPS).
2.3.3.4.4. POST request sent by the CU
To upload the k8 data file the CE318T submit a http form using a POST request on the
HTTP(S) server. The submitted form has the input field submit set to Submit file and the
input field uploaded_file of type file with the uploaded k8 file. It is equivalent to
submitting this form:
<!DOCTYPE html>
<html>
<body>
<form action="/PATH1/PATH2" method="post" enctype="multipart/form-data">
<input type="submit" value="Submit file" name="submit">
<input type="file" name="uploaded_file " id="uploaded_file ">
</form>
</body>
</html>
Where /PATH1/PATH2 is PATH field value in the CE318T parameters.
Here is an example of the POST sent by the CU to this destination URL:
https://dummy:foo1234@www.myserver.com:2020/path1/Path2/Upload.php
POST request:
POST /path1/Path2/Upload.php HTTP/1.1
Host: www.myserver.com
Authorization: Basic ZHVtbXk6Zm9vMTIzNA==
User-Agent: CE318T/dev 2.3.0
Accept: */*
Content-Length: 2516
Connection: keep-alive
Content-Type: multipart/form-data; boundary=-------4c014a87ef48
---------4c014a87ef48
Content-Disposition: form-data; name="submit"
Submit File
---------4c014a87ef48
Content-Disposition: form-data; name="uploaded_file";
filename="0000_20200101090241.k8"
Content-Type: application/octet-stream
<The binary content>
---------4c014a87ef48—