Not able to access APIs on localhost installation
-
Hi,
I was recently introduced to jsReports via a blocand have been trying to setup the local server. The UI works fine on the browser, but when I am trying to access the reports api /api/report as described here: https://jsreport.net/learn/api, The apis return an empty response and I can neither see any results nor logs in the report.log.
Could someone please suggest what am I missing here?
Thanks.
-
Please describe how do you call the API.
Do you use some kind of tool like Postman to test it?
-
Hi @jan_blaha . Thanks for the reply.
Yes, I am trying to make the api call via Postman, and I also tried the GET calls directly in the browser, but both the calls reply with empty response. Please let me know if this clarifies my problem better.
Thanks.
-
It needs to be http POST.
Please share a screenshot from the postman.
-
Hi @jan_blaha, thanks for the update. Here's the video of how I am trying to do it.
I hope this helps in identifying where I am going wrong. Thanks again.
-
You specified both
httpPort
andhttpsPort
in the config.Therefore jsreport started to listen on both ports, where the 5488 one returns HTTP redirect to the 5489 which listen to HTTPS.
It's typically better to deal with SSL in a web server, I would recommend keeping just
httPort:5489
in the config and use just HTTP when developing localy.