Epson TM-m50II Epson POS Printer WebAPI Interface Specification - Page 26
Response, Error response
View all Epson TM-m50II manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 26 highlights
4.2. Response All of the APIs use the Status-Line on the HTTP response message as below. Elements HTTP-Version Status-Code and Reason-Phrase Response Header fields Allowed value "HTTP/1.1" "200" OK "400" Bad Request "404" Not Found "500" Internal Server Error Comply with RFC 2616. If Status-Code is 200 OK, the Device returns the following fields. Pragma: no-cache Cache-Control: no-cache Content-Type: application/json; charset=UTF-8 Table 4-2 Response Message Here's an example HTTP response. ----- begin --1:HTTP/1.1 200 OK *HTTP-Version, *Status-Code, *Reason-Phrase 2:Pragma: no-cache 3:Cache-Control: no-cache 4:Connection: keep-alive 5:Content-Length: 893 6:Content-Type: application/json; charset=UTF-8 *Content-Type 7: 8:{ "result":"success" } *Message Body (JSON) ----- end --- 4.3. Error response Errors are returned from APIs in the following format by JSON in a 200 (OK) response. Name result Value type string Value Indicates the error reason defined by each API. Table 4-3 API Error Response Epson POS Printer WebAPI Interface Specification Revision A M00152302 September 8, 2022 Page: 26