curl -k -v -X GET "https://scim-service:scim-port/scim/v4/Clients?filter=orgId%20eq%1111111111-1111-1111-1111-111111111111"
我想将上述curl请求转换为python请求
org_id = '1111111111-1111-1111-1111-111111111111'
params = urllib.urlencode({'filter' : 'orgId eq org_id'})
request = urllib2.Request(
'https://scim-service:scim-port/scim/v4/Clients?', params)
response = urllib2.urlopen(request, context=ssl._create_unverified_context())
我在打印参数和请求时看到以下内容。
参数---> filter=orgId+eq+org_id
请求---> https://scim-service:scim-port/scim/v4/Clients?
我收到400错误请求。 如何使用urllib2将上述curl请求转换为Python请求?