incubator-hugegraph
incubator-hugegraph copied to clipboard
使用customizedpaths接口时,查询参数和header有什么要求呀,试了一下,404呀?
param = {
"sources":{
"ids":[
game_id
],
"label": "Game"
},
"steps":[
{
"direction": "OUT",
"labels":[
"User_chattalk_game_p30d",
"User_consume_game_p30d"
],
"degree": 1
}
],
"capacity":100,
"limit":100
}
headers={'content-type': 'application/json'}
data = json.dumps(param)
print url
request = urllib2.Request(url, data=data, headers=headers)
response = urllib2.urlopen(request)
这样的发送post请求不对么?能否给个详细的栗子?
param = { "sources":{ "ids":[ game_id ], "label": "Game" }, "steps":[ { "direction": "OUT", "labels":[ "User_chattalk_game_p30d", "User_consume_game_p30d" ], "degree": 1 } ], "capacity":100, "limit":100 } headers={'content-type': 'application/json'} data = json.dumps(param) print url request = urllib2.Request(url, data=data, headers=headers) response = urllib2.urlopen(request)这样的发送post请求不对么?能否给个详细的栗子?
已搞定