I am currently attempting to use python's request library to upload a ".g" or gcode instruction file from my computer to a Duet 3 MB 6HC, with RepRap Firmware 3.4.5 (2022-11-30). Every other get and post has been working but when it comes to uploading said file I have an issue. When I send the file content with the post request the entire content gets encapsulated with quotations making the instructions useless to the duet.
response = requests.post(url="ip/rr_upload", params = {"name": "0:/macros/sample.g"},
json=open("sample.g").read())
When looking at the download request on the browser I can see that the file has been successfully uploaded however the entire file is encapsulated with quotations. Is there a way for the duetboard to ignore the quotes?