odmarkj commented on issue #5312: URL: https://github.com/apache/pulsar/issues/5312#issuecomment-832235293
Also, for others coming to this thread, this Python code works: ``` import requests from requests_toolbelt.multipart.encoder import MultipartEncoder url = 'http://localhost:8080/admin/v3/functions/public/default/exampleFunction3232' mp_encoder = MultipartEncoder( fields={ 'functionConfig': ('functionConfig', '{"runtime":"PYTHON","name":"exampleFunction3232","parallelism":1,"tenant":"public","namespace":"default","className":"csv_test.src.wrapper.Wrapper","inputs":["non-persistent://public/default/in"]}', 'application/json'), 'data': ('688b4a39f351fd4725edc2ba1d6a5937.zip', open('/tmp/688b4a39f351fd4725edc2ba1d6a5937.zip', 'rb'), 'application/octet-stream') } ) r = requests.post( url, data=mp_encoder, headers={'Content-Type': mp_encoder.content_type} ) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
