Can't access data from frappe.form_dict

I’m trying to send a post request containing a single key to an api server script on a frappe instance, but when I try to access that key using frappe.form_dict[key_name], I get a KeyError. I’ve created and executed multiple server scripts using the same method before so I have no idea why this is happening now, I tried even create a test script but it does the same. For reference:

  1. Test day payload through postman

{
“payload”: “data received.”
}

  1. Simple Test Script

test_data = frappe.form_dict

payload = test_data[“payload”]

frappe.response[“result”] = payload