httpx
httpx copied to clipboard
show how to send multipart form data without files
Summary
As it is, the documentation hints at the possibility of sending a request with a multipart form encoded body, but it is not explicit about it.
Hence it takes more time to figure it out on your own, especially for a less experienced developer.
This PR only adds 1 example in the multipart section of the quickstart page to demonstrate the process.
Checklist
- [X] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [ ] ~~I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.~~ Not applicable (only changed documentation)
- [X] I've updated the documentation accordingly.
I only have a doubt on the section title and the small sentence before the example does not mention that the example makes use of the files param instead of the data param.
Could improve this if needed.
@sylann I see this error when I try to use your example - chunk = self.file.read(self.CHUNK_SIZE) AttributeError: 'dict' object has no attribute 'read'