Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tushar09's avatar

Laravel post request api is not working.

I am using bluehost shared hosting. My api is not working. Whenever I hit the api url through postman, it shows me an error about enabling javascript. It says: For full functionality of this site it is necessary to enable JavaScript. Please enable JavaScript in your web browser.

The same code is working fine in godaddy. I talked with bluehost support team. They are telling me that the basic javascript is already enabled. Then the problem is coming from where? Is there any thing I need to change in laravel?

0 likes
3 replies
DavidLoevy's avatar

??? I dont know ... what is "preview" mode in Postman? Where/how can I check it? And how to switch it?

Snapey's avatar

The point is, you should not be getting a response containing javascript.

This indicates that you have not sent the header in the postman request to ask for a json response.

Set the header, Accept: application/json

Please or to participate in this conversation.