2020-08-24, 09:32 PM
(This post was last modified: 2020-08-24, 09:36 PM by scJohn.
Edit Reason: added status code
)
I have the following fetch API:
I am requesting 'format=json'.
When i get an good(valid event_id) response I get a json response: info [recurringRecording.js]: response "{\"stat\":\"ok\"}\r\n"
When i get an error(invalid event_id) response I get xml: info [recurringRecording.js]: response "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<rsp stat=\"fail\">\r\n <err code=\"2\" msg=\"Invalid Args\" />\r\n</rsp>\r\n"
Status Code is 200 for both requests.
Am I doing something wrong or is this a bug.
Thanks
PHP Code:
fetch(`http://localhost:8866/services/service?method=recording.save&format=json&event_id=11579903`)
I am requesting 'format=json'.
When i get an good(valid event_id) response I get a json response: info [recurringRecording.js]: response "{\"stat\":\"ok\"}\r\n"
When i get an error(invalid event_id) response I get xml: info [recurringRecording.js]: response "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<rsp stat=\"fail\">\r\n <err code=\"2\" msg=\"Invalid Args\" />\r\n</rsp>\r\n"
Status Code is 200 for both requests.
Am I doing something wrong or is this a bug.
Thanks
Server:
CPU- Intel I5-8400, Ram -12GB, SSD - 128GB, HDD - 1TB, Turners - Hauppauge WinTV-quadHD, OS - Win 10 Home, Router - TP-Link Archer C7(AC1750).
Clients:
Intel NUC CPU - Intel N3700, RAM - 4GB, SSD - 128GB, OS - Win 10, Wired Ethernet.
CPU- Intel I5-8400, Ram -12GB, SSD - 128GB, HDD - 1TB, Turners - Hauppauge WinTV-quadHD, OS - Win 10 Home, Router - TP-Link Archer C7(AC1750).
Clients:
Intel NUC CPU - Intel N3700, RAM - 4GB, SSD - 128GB, OS - Win 10, Wired Ethernet.