How to replace `cgi.FieldStorage().getvalue("data", "")` for a POST request

The cgi module is deprecated so I need to replace my code’s use of it.
When my server receives a POST request (or any request) to a py file, it executes the file and what’s printed is returned as the request’s response.
In the one file I have that uses that, I use the line in the title, cgi.FieldStorage().getvalue("data", "") to extract the data passed through the request (which I then pass through json.loads).
The cgi module advises to replace calls to FieldStorage with calls to urllib.parse.parse_qsl, but that function has required parameters and the line I have does not. It also advises to install a third-party module and for many reasons that’s a solution of last resort for me.
What can I do ?

I think this post that appeared in the related section of this thread should be able to help you: Alternative function for deprecated cgi - #6 by James_E