We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put Request failed with sending octet-stream file, for example:
Put Request
Create Session | ${session_name} | http://upload.mytestaddress.com/upload | timeout=60 | max_retries=0 ${file_data} | Get Binary File | D:\\\\DSC_6613.jpg ${LocalHeader} | Create Dictionary | Content-type=application/octet-stream ${response}= | Put Request | ${session_name} | /System/deviceInfo | ${file_data} | headers=${LocalHeader}
which will get error:
FAIL : UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte
btw, if using Put keyword instead of Put Request, it won't get error.
Put
The text was updated successfully, but these errors were encountered:
can you try
${LocalHeader} | Create Dictionary | Content-type=application/x-www-form-urlencoded
Sorry, something went wrong.
@vkosuri I tried and got the same error.
I found where that exception came from:
https://github.com/bulkan/robotframework-requests/blob/11baa3277f1cb728712e26d996200703c15254a8/src/RequestsLibrary/RequestsKeywords.py#L816
and I don't understand why the data need to be decoded? Maybe this is unnecessary for octet-file data?
data
@mangobowl could you try to enable debug flag on create session?
No branches or pull requests
Put Request
failed with sending octet-stream file, for example:which will get error:
btw, if using
Put
keyword instead ofPut Request
, it won't get error.The text was updated successfully, but these errors were encountered: