mirror of
https://github.com/httpie/cli.git
synced 2026-06-20 11:32:56 +02:00
Request content type
This commit is contained in:
1 parent
c431ed7728
commit
e4e40e5b06
9 files changed
+85
-32
No files matched your search
+2
-2
@@ -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
|
||||
Reference in new issue
Block a user