fix add_json to handle POST request