As furas says , I use curl_cffi library. The script below is working well.
import curl_cffi
url='http://********:59599'
header = {'specific-app-header':'01-fr-open-edition-03'}
def post(file_path):
mp = curl_cffi.CurlMime()
mp.addpart(
name="files",
filename="files.log",
content_type="application/x-www-form-urlencoded",
local_path=file_path,
)
resp = curl_cffi.post(url, headers=header, stream=True, multipart=mp)
for line in resp.iter_lines():
if line:
print(line.decode())
post('../finder_result/oej/oej-2025-01-01.log')
# .... lines is display
post('/tmp/2_000_000_lines.log')
# ... lines is also display
Thank you for all your advice.