I’m using: SWI-Prolog 64 bits, version 8.1.10-56
I want the code to: I have added use_module(library(http/http_log)). It is writing requests/responses to httpd.log file, but it is writing wrong status codes, it seems like all status codes are 200. When prolog is responding to a requests, it is explicitly setting status code in reply_json. The response should look something like this completed(8, 0.0014660000000000003, 139, 400, bad).
But what I’m getting is: Last line of httpd.log is: completed(8, 0.0014660000000000003, 139, 200, ok).
My code looks like this:
reply_json(ErrorOut, [status(400)])
My suspicion is that it is because I am explicitly setting status codes. Because in reality the code executes properly.