79246554

Date: 2024-12-03 07:02:46
Score: 1
Natty:
Report link

You have to use type="json" in the controller. It will go like the following:

class MySuperController(http.Controller):

@http.route('/devolive/review/<int:product_id>', type="json", method=['GET'])
def get_review_data(self, product_id):
    return result

This will always return the data in JSON format.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tina Sharma