-
-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
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
feat(content): allow multipart requests without files. #3397
base: master
Are you sure you want to change the base?
feat(content): allow multipart requests without files. #3397
Conversation
Thanks. I've updated the tests to avoid private imports. Do we think this is an improved behaviour? It does seem nice that an explicit |
Thanks for the update! My original plan was to make it easier to use multipart without having to carry files, which wasn’t as straightforward before. I don’t use the cli much, so if this causes any issues, just let me know. |
Summary
related #3396.
Currently, a multipart request can only be sent when the files parameter is non-empty. This restriction limits cases where users might want to send data using multipart mode without attaching any files, which is possible in tools like Postman.
Change: Instead of requiring files to be non-empty, we could determine the need for a multipart request based on whether files is None rather than its emptiness. This would allow users to send multipart requests without attaching files if needed.
I think there is no significant documentation update required, so I have not made any changes. However, please let me know if any updates are needed.
Checklist