httpie-aws-authv4 icon indicating copy to clipboard operation
httpie-aws-authv4 copied to clipboard

TypeError: object supporting the buffer API required with BufferedReader requests

Open m9aertner opened this issue 2 years ago • 2 comments

Very similar to Issue 10, we are seeing an issue when POSTing some piped content, e.g. via here file:

http -A aws4 POST $AWS_ES_URL/some_index/doc/TEST:1 <<<'{"SOME":"text"}'
...
http: error: TypeError: object supporting the buffer API required

In this case, the body appears to be a BufferedReader, with BufferedIOBase superclass defining the read() method. Materializing the reader using read() works around that problem, at the cost of loading the body into memory.

m9aertner avatar Jun 15 '22 18:06 m9aertner

Proposed fix: https://github.com/DavidMuller/aws-requests-auth/pull/64

m9aertner avatar Jun 15 '22 22:06 m9aertner

Thank you for reporting this! I will keep an eye on the linked PR and bump the dependency when it is resolved.

aidan- avatar Jun 16 '22 11:06 aidan-