Request content type

This commit is contained in:
Jakub Roztocil committed 2020-09-25 14:44:22 +02:00
1 parent c431ed7728
commit e4e40e5b06
9 files changed
+85 -32

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ from httpie.cli.dicts import RequestDataDict, RequestFilesDict
# Multipart uploads smaller than this size gets buffered (otherwise streamed).
# NOTE: Unbuffered upload requests cannot be displayed on the terminal.
UPLOAD_BUFFER = 1024 * 100
MULTIPART_UPLOAD_BUFFER = 1024 * 1000
def get_multipart_data_and_content_type(
@@ -28,5 +28,5 @@ def get_multipart_data_and_content_type(
else:
content_type = encoder.content_type
data = encoder.to_string() if encoder.len < UPLOAD_BUFFER else encoder
data = encoder.to_string() if encoder.len < MULTIPART_UPLOAD_BUFFER else encoder
return data, content_type