kingdom998 commented on issue #16631:
URL: https://github.com/apache/pulsar/issues/16631#issuecomment-1251762501

   > Hello, someone can help me to solve the problem?
   
   you can use curl like below 
   ```
   curl --location --request POST 
'http://127.0.0.1:8080/admin/v3/functions/sample/ns1/toupper' \
   --header 'Content-Disposition;' \
   --form 'data=@"/Users/zy/01_prj/pulsar/func/uppercase.py"' \
   --form 'functionConfig=@"/Users/zy/01_prj/pulsar/func/upper.json"'
   ```
   
   or python script below
   
   ```
   import requests
   
   url = "http://127.0.0.1:8080/admin/v3/functions/sample/ns1/toupper";
   
   payload={}
   files=[
     
('data',('uppercase.py',open('/Users/zy/01_prj/pulsar/func/uppercase.py','rb'),'application/octet-stream')),
     
('functionConfig',('upper.json',open('/Users/zy/01_prj/pulsar/func/upper.json','rb'),'application/json'))
   ]
   headers = {
     'Content-Disposition': ''
   }
   
   response = requests.request("POST", url, headers=headers, data=payload, 
files=files)
   
   print(response.text)
   
   ```
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to