Hi @jamie00171 thanks for reply, i will show you the demo: import requests
import gzip
import ndjson
import functools
from io import BytesIO, SEEK_SET, SEEK_END
# About 50MB after gzip compression, and about 900MB after decompression
url = "https://{{fqdn}}/packages/{{uuid}}"
payload = {}
headers = {
'Authorization': 'Bearer {{token}}',
"Accept-Encoding": "gzip",
'Connection': 'keep-alive'
}
def stream_transfer():
with requests.request("GET", url, headers=headers, data=payload, stream=True) as r:
print(r.headers)
r1 = requests.post("http://10.64.21.32:8088/services/collector/raw", headers={
"Authorization": "Splunk f98f1101-e880-49e9-88ac-d08e8ce0c1e5",
"Content-Encoding": "gzip",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
# "Content-Length": r.headers["Content-Length"]
}, data=r.raw.stream(1024*1024, decode_content=False))
if __name__ == "__main__":
stream_transfer() and i also show you the headers in response, the content length is in it, {'Date': 'Tue, 24 Jan 2023 01:46:16 GMT', 'Content-Type': 'text/plain; charset=UTF-8', 'Content-Length': '49039690', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'} then it will raise this like i said above: <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>413 Content-Length of 838889996 too large (maximum is 838860800)</title></head><body><h1>Content-Length of 838889996 too large (maximum is 838860800)</h1><p>The request your client sent was too large.</p></body></html>
... View more