Closed Crumb5 closed 1 year ago
Describe the bug files api endpoint incorrectly quotes file contents "eula=true" != eula=true Data is being passed as json and not text
"eula=true"
eula=true
To Reproduce
api.client.servers.files.write_file(server_id="abcd1234",path="eula.txt", contents="eula=true")
"eula=true" != eula=true
Expected behavior File contents should be unquoted
Environment
This is what i did to get it to work: https://github.com/iamkubi/pydactyl/blob/7f65673af7b437a8d51c57f1d92ce164d83ede22/pydactyl/api/base.py#L81
if 'files/write' not in url: response = self._session.post(url, params=params, headers=headers, json=data) else: headers['Content-Type']="application/text" response = self._session.post(url, params=params, headers=headers, data=data)
Describe the bug files api endpoint incorrectly quotes file contents
"eula=true"
!=eula=true
Data is being passed as json and not textTo Reproduce
"eula=true"
!=eula=true
Expected behavior File contents should be unquoted
Environment
This is what i did to get it to work: https://github.com/iamkubi/pydactyl/blob/7f65673af7b437a8d51c57f1d92ce164d83ede22/pydactyl/api/base.py#L81