Use cURL api in erpnext

How can i use curl api in erpnext

Use requests instead.

But i need to use curl api

requests has more than what cURL has to offer. You’re assuming that cURL exists (They’re not shipped by default on many OSes). Nevertheless,

Spawn the cURL process then.

>>> import os
>>> os.system('curl')

Or capture the input using subprocess.Popen?

>>> import subprocess
>>> subprocess.Popen(['curl', '-fsSL', ''], stdout = subprocess.PIPE, stderr = subprocess.PIPE)

requests alternative

>>> import requests
>>> r = requests.get('')
>>> r.json()

Comes shipped with ERPNext!