Skip to content
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

what if someone sets both data and files when making a request? #6681

Closed
siddhsql opened this issue Apr 10, 2024 · 1 comment
Closed

what if someone sets both data and files when making a request? #6681

siddhsql opened this issue Apr 10, 2024 · 1 comment
Labels
actions/autoclose-qa Used for automation to auto-close an issue Question/Not a bug

Comments

@siddhsql
Copy link

from the docs:

data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request.

files – (optional) Dictionary of 'name': file-like-objects (or {'name': file-tuple}) for multipart encoding upload. file-tuple can be a 2-tuple ('filename', fileobj), 3-tuple ('filename', fileobj, 'content_type') or a 4-tuple ('filename', fileobj, 'content_type', custom_headers), where 'content_type' is a string defining the content type of the given file and custom_headers a dict-like object containing additional headers to add for the file.

what happens if someone sets both? i ask because AFAIU, files is sent in the request body

@siddhsql siddhsql added actions/autoclose-qa Used for automation to auto-close an issue Question/Not a bug labels Apr 10, 2024
Copy link

As described in the template, we won't be able to answer questions on this issue tracker. Please use Stack Overflow

@github-actions github-actions bot locked as off-topic and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
actions/autoclose-qa Used for automation to auto-close an issue Question/Not a bug
Projects
None yet
Development

No branches or pull requests

1 participant