$ curl -X POST --noproxy “*” -k "https://server_name/connect/token" -H "Content-Type: application/x-www-form-urlencoded" -d "username=asdfg" -d "password=ghjkl" -d "client_id=CLIENT_ID" -d "client_secret=CLIENT_SECRET" -d "scopes=openid profile role" -d "grant_type=password"
Hello, Can somebody help me to call the following curl command through HTTPCaller via FME Desktop?
Curl is meant to be run from the command line, not through HTTPCaller.
The SystemCaller may be of help here.
you can use python caller also to do this
import urllib2
data = '{"nw_src": "10.0.0.1/32", "nw_dst": "10.0.0.2/32", "nw_proto": "ICMP", "actions": "ALLOW", "priority": "10"}'
url = 'http://localhost:8080/firewall/rules/0000000000000001'
req = urllib2.Request(url, data, {'Content-Type': 'application/json'})
f = urllib2.urlopen(req)
for x in f:
print(x)
f.close()
you can use python caller also to do this
import urllib2
data = '{"nw_src": "10.0.0.1/32", "nw_dst": "10.0.0.2/32", "nw_proto": "ICMP", "actions": "ALLOW", "priority": "10"}'
url = 'http://localhost:8080/firewall/rules/0000000000000001'
req = urllib2.Request(url, data, {'Content-Type': 'application/json'})
f = urllib2.urlopen(req)
for x in f:
print(x)
f.close()
Thank you. I will try this
Hi @sal, check out this article which runs through how you might use the HTTPCaller to make a call using cURL: https://community.safe.com/s/article/Web-Services-cURL-and-the-HTTPCaller
Hi @sal, check out this article which runs through how you might use the HTTPCaller to make a call using cURL: https://community.safe.com/s/article/Web-Services-cURL-and-the-HTTPCaller
Thank you. It is really helpful.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.