incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

使用customizedpaths接口时,查询参数和header有什么要求呀,试了一下,404呀?

Open 597477803 opened this issue 6 years ago • 1 comments

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请求不对么?能否给个详细的栗子?

597477803 avatar Apr 20 '20 09:04 597477803

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请求不对么?能否给个详细的栗子?

已搞定

597477803 avatar Apr 20 '20 10:04 597477803